24 game/Solve: Difference between revisions

→‎{{header|jq}}: more concise
m (→‎{{header|REXX}}: elided the use of shortcuts for range of the SOLVE function.)
(→‎{{header|jq}}: more concise)
Line 3,996:
def permutations:
if length == 0 then []
else range(0;length) as $i
| [.[$i]] |+ ($in|del(.[$i])|permutations)
. as $in | range(0;length) | . as $i
| ($in|del(.[$i])|permutations)
| [$in[$i]] + .
end ;
 
2,442

edits