X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?a=blobdiff_plain;f=zipper-lists-continuations.mdwn;h=bfd144c1ede17257d7847957abf1fded70590127;hb=fa335a201b26e6100c34f4f178bc10cd3249220f;hp=8c052f0e22c42b5470d1c723c4753dc875b6df2a;hpb=d7222c3a02d8dd06a06377ee4d305bc4fbeab5f4;p=lambda.git diff --git a/zipper-lists-continuations.mdwn b/zipper-lists-continuations.mdwn index 8c052f0e..bfd144c1 100644 --- a/zipper-lists-continuations.mdwn +++ b/zipper-lists-continuations.mdwn @@ -5,9 +5,7 @@ continuation monad. The three approches are: -* Rethinking the list monad; -* Montague's PTQ treatment of DPs as generalized quantifiers; and -* Refunctionalizing zippers (Shan: zippers are defunctionalized continuations); +[[!toc]] Rethinking the list monad ------------------------- @@ -230,10 +228,12 @@ Sigh. Ocaml won't show us our own list. So we have to choose an `f` and a `z` that will turn our hand-crafted lists into standard Ocaml lists, so that they will print out. +
 # let cons h t = h :: t;;  (* Ocaml is stupid about :: *)
 # l'_bind (fun f z -> f 1 (f 2 z)) 
           (fun i -> fun f z -> f i (f (i+1) z)) cons [];;
 - : int list = [1; 2; 2; 3]
+
Ta da! @@ -304,3 +304,6 @@ versa. The connections will be expecially relevant when we consider indefinites and Hamblin semantics on the linguistic side, and non-determinism on the list monad side. +Refunctionalizing zippers +------------------------- +