To bad this digression, though it ties together various
elements of the course, has *no relevance whatsoever* to the topic of
-continuations.
+continuations...
Montague's PTQ treatment of DPs as generalized quantifiers
----------------------------------------------------------
belabor the construction of the bind function, the derivation is
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 =
- fun (k:'a -> 'b) -> u (fun (x:'a) -> f x k)
+<pre>
+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)
+</pre>
How similar is it to the List monad? Let's examine the type
constructor and the terms from the list monad derived above: