edits
[lambda.git] / zipper-lists-continuations.mdwn
index a2603db..ed822f8 100644 (file)
@@ -275,7 +275,7 @@ similar to the List monad just given:
 type 'a continuation = ('a -> 'b) -> 'b
 c_unit (x:'a) = fun (p:'a -> 'b) -> p x
 c_bind (u:('a -> 'b) -> 'b) (f: 'a -> ('c -> 'd) -> 'd): ('c -> 'd) -> 'd =
 type 'a continuation = ('a -> 'b) -> 'b
 c_unit (x:'a) = fun (p:'a -> 'b) -> p x
 c_bind (u:('a -> 'b) -> 'b) (f: 'a -> ('c -> 'd) -> 'd): ('c -> 'd) -> 'd =
-fun (k:'a -> 'b) -> u (fun (x:'a) -> f x k)
+  fun (k:'a -> 'b) -> u (fun (x:'a) -> f x k)
 </pre>
 
 How similar is it to the List monad?  Let's examine the type
 </pre>
 
 How similar is it to the List monad?  Let's examine the type
@@ -294,8 +294,6 @@ parallel in a deep sense.  To emphasize the parallel, we can
 instantiate the type of the list' monad using the Ocaml list type:
 
     type 'a c_list = ('a -> 'a list) -> 'a list
 instantiate the type of the list' monad using the Ocaml list type:
 
     type 'a c_list = ('a -> 'a list) -> 'a list
-    let c_list_unit x = fun f -> f x;;
-    let c_list_bind u f = fun k -> u (fun x -> f x k);;
 
 Have we really discovered that lists are secretly continuations?
 Or have we merely found a way of simulating lists using list
 
 Have we really discovered that lists are secretly continuations?
 Or have we merely found a way of simulating lists using list