--- /dev/null
+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