somme ex2 and ex3 text
[tt2015.git] / a3 / code / Generics / GenHylo.icl
diff --git a/a3/code/Generics/GenHylo.icl b/a3/code/Generics/GenHylo.icl
deleted file mode 100644 (file)
index d8e5876..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-implementation module GenHylo \r
-\r
-import StdGeneric, GenMap, StdFunc\r
-\r
-:: Fix f = In (f .(Fix f))\r
-\r
-Out :: !u:(Fix v:a) -> v:(a w:(Fix v:a)), [u <= w]\r
-Out (In x) = x\r
-\r
-hylo :: ((.f .b) -> .b) (.a -> (.f .a)) -> (.a -> .b) | gMap{|*->*|} f\r
-hylo consume produce = consume o gMap{|*->*|} (hylo consume produce) o produce\r
-\r
-cata :: (u:(f .a) -> .a) -> (Fix u:f) -> .a | gMap{|*->*|} f\r
-cata f = hylo f Out \r
-\r
-ana :: (.a -> u:(f .a)) -> .a -> (Fix u:f) | gMap{|*->*|} f\r
-ana f = hylo In f\r
-\r