Permutations: Difference between revisions

Line 1,871:
(loop for a = "1234" then (next-perm a #'char<) while a do
(write-line a))</lang>
 
=={{header|Crystal}}==
<lang Ruby>puts [1, 2, 3].permutations</lang>
{{out}}
<pre>[[1, 2, 3], [1, 3, 2], [2, 1, 3], [2, 3, 1], [3, 1, 2], [3, 2, 1]]</pre>
 
=={{header|Curry}}==
Anonymous user