Jump to content

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,482

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.