Get all permutations of a list in Haskell

后端 未结 8 1144
一整个雨季
一整个雨季 2020-12-15 17:34

I\'m trying to do this from scratch, without the use of a library outside the standard lib. Heres my code:

permutations :: [a] -> [[a]]
permutations (x:xs         


        
8条回答
提交回复
热议问题