Disordinare un array
Esempi in Ruby e in altri linguaggi
class Array def randomly_pick sort {|a, b| rand(3)-1} end end
x = (1..20).to_a
100.times { print x.randomly_pick.inspect, “\n” }
Name *
Email address *
Website
Comment
0 comments
Readers left 0 notes on this photograph. Live yours using the form below.