Anonymous user
Permutations: Difference between revisions
m
→{{header|Haskell}}: Fixed type definition
m (→names: put subroutines in alphabetical order, changed comments and indentation, added whitespace. -- ~~~~) |
m (→{{header|Haskell}}: Fixed type definition) |
||
Line 1,467:
<lang haskell>import Data.List (delete)
permutations :: Eq a
permutations [] = [[]]
permutations xs = [ x:ys | x <- xs, ys <- permutations (delete x xs)]</lang>
|