Skip to content

Instantly share code, notes, and snippets.

@satoyuichi
Created January 24, 2014 16:42
Show Gist options
  • Save satoyuichi/8601043 to your computer and use it in GitHub Desktop.
Save satoyuichi/8601043 to your computer and use it in GitHub Desktop.
与えられたコレクションの全ての並び順を出力する
#(1 2 3) permutationsDo: [:each | Transcript cr; show: each printString]
@satoyuichi
Copy link
Author

(1 2 3)

(1 3 2)

(2 1 3)

(2 3 1)

(3 2 1)

(3 1 2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment