Permutations: Difference between revisions
→{{header|Haskell}}: Switched foldl to foldr (more efficient, and usually the default)
(→{{header|Haskell}}: Slight reformulation of the Mathematica-based version, in terms of the applicative <*> operator) |
(→{{header|Haskell}}: Switched foldl to foldr (more efficient, and usually the default)) |
||
Line 2,944:
ins :: a -> [a] -> Int -> [a]
ins x list n = L.intercalate [x] $ [
permutations :: [a] -> [[a]]
permutations =
main :: IO ()
|