I'm taking an array slice instead of using map(). And we can get even shorter if we call it as reorder(@elements, \@neworder):sub reorder { #234567890123456 @{+pop}[@{+pop}] }
sub reorder { #2345678901 @_[@{+pop}] }
In reply to Re^2: (CLPM) reorder via swap
by japhy
in thread (CLPM) reorder via swap
by japhy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |