Created
March 21, 2016 15:07
-
-
Save Tyralion/9d2a797ca401189d9362 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| perms [] = [[]] | |
| perms list = let | |
| del x [] = [] | |
| del x (y:ys) = if x /= y then y : del x ys else del x ys | |
| in concatMap (\x -> map (x:) $ perms $ del x list ) list |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment