-data List a = Nil | Cons a (List a)\r
-\r
-map f Nil = Nil\r
-map f (Cons h t) = Cons (f h) (map f t)\r
-\r
-map2 f l = run l\r
- where\r
- run Nil = Nil\r
- run (Cons h t) = Cons (f h) (run t)\r
-\r
-map3 f l = run l\r
- where\r
- run Nil = Nil\r
- run (Cons h t) = Cons (f h) (map f t)\r
- \r
-main = "Foo"\r
---\r
+data List a = Nil | Cons a (List a)
+
+map f Nil = Nil
+map f (Cons h t) = Cons (f h) (map f t)
+
+map2 f l = run l
+ where
+ run Nil = Nil
+ run (Cons h t) = Cons (f h) (run t)
+
+map3 f l = run l
+ where
+ run Nil = Nil
+ run (Cons h t) = Cons (f h) (map f t)
+
+main = "Foo"
+--