Re: More random, please ! :)

the alphabet randomly and each statistically equal handled
that each letter is handled equally from the statistical
point of view ?

Will this do?

require ‘matrix’
letters = (‘a’…‘z’).sort_by{ rand }
m = Matrix[ letters[0…4], letters[5…9], letters[10…14],
letters[15…19], letters[20…24] ]

I think there’s a method to break an array into X equal parts, but I
can’t recall.



This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs