Permutations: Difference between revisions

Content deleted Content added
No edit summary
Line 350: Line 350:


=={{header|Aime}}==
=={{header|Aime}}==
<lang aime></lang>
<lang aime>void
f1(record r, ...)
{
if (~r) {
for (text s in r) {
r.delete(s);
rcall(f1, -2, 0, -1, s);
r[s] = 0;
}
} else {
ocall(o_, -2, 1, -1, " ", ",");
o_newline();
}
}

main(...)
{
record r;

ocall(r_put, -2, 1, -1, r, 0);
f1(r);

0;
}</lang>
{{Out}}
{{Out}}
<pre>aime permutations -a Aaa Bb C
<pre></pre>
Aaa, Bb, C,
Aaa, C, Bb,
Bb, Aaa, C,
Bb, C, Aaa,
C, Aaa, Bb,
C, Bb, Aaa,</pre>


=={{header|ALGOL 68}}==
=={{header|ALGOL 68}}==