Rudi Cilibrasi
Posts: 25
Nickname: cilibrar
Registered: Aug, 2004
|
Rudi Cilibrasi is a longtime programmer and machine-learning researcher who loves Ruby
|
|
|
|
Ruby Haiku 137
|
Posted: Jan 26, 2005 6:54 PM
|
|
|
This post originated from an RSS feed registered with Ruby Buzz
by Rudi Cilibrasi.
|
Original Post: Ruby Haiku 137
Feed Title: Esoteric Ruby Blog
Feed URL: http://cilibrar.com/~cilibrar/erblog.cgi/index.rss
Feed Description: A weblog made to explore some Ruby ideas in great detail and try to work out ideal solutions to real problems.
|
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Rudi Cilibrasi
Latest Posts From Esoteric Ruby Blog
|
|
class Array
def scramble() dup.scramble! end # scramble v. 0.15
def swap(i,j) self[i],self[j] = at(j),at(i) end # by cilibrar
def scramble!() each_index() { |i| swap(i,i+rand(size-i)) } end
end
Read: Ruby Haiku 137
|
|