瀏覽代碼

Create a non working version of anagram builder

DricomDragon 5 年之前
父節點
當前提交
e5460a0853
共有 1 個文件被更改,包括 7 次插入0 次删除
  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