Permutations: Difference between revisions
m
→AppleScript Recursive: (concatMap . delete) tidied
(→{{header|REXX}}: added/changed whitespace and comments, optimized the function, used templates for the output sections.) |
m (→AppleScript Recursive: (concatMap . delete) tidied) |
||
Line 476:
Recursively, in terms of concatMap and delete:
<lang AppleScript>
-- permutations :: [a] -> [[a]]
Line 504:
on run
Line 512:
-- concatMap :: (a -> [b]) -> [a] -> [b]
Line 525:
return lst
end concatMap
-- delete :: a -> [a] -> [a]
Line 552 ⟶ 553:
end if
end mReturn
-- uncons :: [a] -> Maybe (a, [a])
|