An open API service indexing awesome lists of open source software.

https://github.com/bapjiws/haskell-permutations

Finding a list's permutations using only simple stuff from Prelude like concat, map, head, and tail
https://github.com/bapjiws/haskell-permutations

Last synced: 2 months ago
JSON representation

Finding a list's permutations using only simple stuff from Prelude like concat, map, head, and tail

Awesome Lists containing this project

README

        

The **permute** function works like so:



GHCi> permute [1,2,3,4]
[[1,2,3,4],[1,2,4,3],[1,3,4,2],[1,3,2,4],[1,4,2,3],[1,4,3,2],[2,3,4,1],[2,3,1,4],[2,4,1,3],[2,4,3,1],[2,1,3,4],[2,1,4,3],[3,4,1,2],[3,4,2,1],[3,1,2,4],[3,1,4,2],[3,2,4,1],[3,2,1,4],[4,1,2,3],[4,1,3,2],[4,2,3,1],[4,2,1,3],[4,3,1,2],[4,3,2,1]]