Permutations: Difference between revisions

Content added Content deleted
(→‎{{header|Perl 6}}: missing semicolon in entity)
Line 259: Line 259:
ENDPROC
ENDPROC
DEF PROC_Permutation_Reverse(A%(), firstindex, lastindex)
DEF PROC_Permutation_Reverse(A%(), first, last)
LOCAL first, last
first = firstindex
last = lastindex
WHILE first < last
WHILE first < last
SWAP A%(first), A%(last)
SWAP A%(first), A%(last)