Permutations: Difference between revisions

Content added Content deleted
(Added Bracmat)
Line 494: Line 494:


=={{header|Bracmat}}==
=={{header|Bracmat}}==
<lang> ( perm
<lang bracmat> ( perm
= prefix List result original A Z
= prefix List result original A Z
. !arg:(?.)
. !arg:(?.)
Line 508: Line 508:
& out$(perm$(.a 2 "]" u+z);</lang>
& out$(perm$(.a 2 "]" u+z);</lang>
Output:
Output:
<lang> (a 2 ] u+z.)
<pre> (a 2 ] u+z.)
(a 2 u+z ].)
(a 2 u+z ].)
(a ] u+z 2.)
(a ] u+z 2.)
Line 531: Line 531:
(u+z 2 a ].)
(u+z 2 a ].)
(u+z ] a 2.)
(u+z ] a 2.)
(u+z ] 2 a.)</lang>
(u+z ] 2 a.)</pre>

=={{header|C}}==
=={{header|C}}==
See [[wp:Permutation#Systematic_generation_of_all_permutations|lexicographic generation]] of permutations.
See [[wp:Permutation#Systematic_generation_of_all_permutations|lexicographic generation]] of permutations.