Ruby On loop a random generator unt...
by Alec Leitner,
August 15, 2009 23:36
Frahugo, that's a neat tric...
Ruby On loop a random generator unt...
by Alec Leitner,
August 11, 2009 06:33
Joel, in my case that's not...
def create_something(min_value)
loop do
something = SomeClass.generate_random
...
Ruby loop a random generator unt...
This is my version of loopi...
details.map{|x| x[:subtotal]}
Ruby On Extract specific keys from ...
by Alec Leitner,
August 04, 2009 02:16
is this what you want?
class Array
def compress
sorted = compact.uniq.sort
...
Ruby On compressing an array of int...
by Alec Leitner,
April 15, 2009 23:52
and here's the non-destruct...
class Array
def compress!
compact!
...
Ruby On compressing an array of int...
by Alec Leitner,
April 15, 2009 23:36
cleaned it up a bit... any ...
class Array
def compress!
compact!
...
Ruby On compressing an array of int...
by Alec Leitner,
April 15, 2009 23:31
found a shorter solution, s...
Haskell On compressing an array of int...
by Alec Leitner,
April 15, 2009 18:37
Oh, I might have to learn H...
class Array # does a kind of ZIP compression for integer arrays # examples: ...
Ruby compressing an array of int...
I've written a small method...