Permutations: Difference between revisions

m
(→‎AppleScript Recursive: The RC convention is that contributions are unsigned. Removed name tag.)
m (→‎{{header|Tailspin}}: syntax update)
Line 7,103:
def p: $;
1..$n -> \(def k: $;
[$p(1..$k-1)..., $n, $p($k..-1last)...] !\) !
end expand
$n - 1 -> permutations -> expand !
Line 7,148:
$index + 1 -> findPerms !
\) !
@perms([-1last, $index..last-21]): $@perms($index..-1last)...;
end findPerms
@: [1..$];
Anonymous user