Browse Source

Create a non working version of anagram builder

DricomDragon 5 years ago
parent
commit
e5460a0853
1 changed files with 7 additions and 0 deletions
  1. 7 0
      anagram.hs

+ 7 - 0
anagram.hs

@@ -0,0 +1,7 @@
+import Data.List
+
+sweep f l stack = case stack of
+	[] -> []
+	cur:substack -> concat [map (\l -> cur:l) (f (delete cur l)), sweep f l substack]
+
+ana l = sweep ana l l