Created
August 18, 2012 21:39
-
-
Save mmaa/3390043 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def make_groups(names, size) | |
names.shuffle!.group_by { |i| names.rindex(i) % size } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment