Created
October 15, 2014 06:40
-
-
Save serdardalgic/9cbd7e54e83c3c3c8403 to your computer and use it in GitHub Desktop.
Ruby monk
This file contains hidden or 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 number_shuffle(number) | |
number.to_s.split("").permutation.to_a.inject([]) {|arr, el| arr << el.join.to_i} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment