Jacobson as a monad
[lambda.git] / week8.mdwn
index 4388e44..7f42092 100644 (file)
@@ -11,7 +11,9 @@ positions.  The system does not make use of assignment functions or
 variables.  We'll see that from the point of view of our discussion of
 monads, Jacobson's system is essentially a reader monad in which the
 assignment function threaded through the computation is limited to at
-most one assignment.
+most one assignment.  More specifically, Jacobson's geach combinator
+*g* is exactly our `lift` operator, and her binding combinator *z* is
+exactly our `bind` with the arguments reversed!
 
 Jacobson's system contains two main combinators, *g* and *z*.  She
 calls *g* the Geach rule, and *z* effects binding.  (There is a third
@@ -156,3 +158,15 @@ Jacobson's variable-free semantics is essentially a reader monad.
 
 One of Jacobson's main points survives: restricting the reader monad
 to a single-value environment eliminates the need for variable names.
+
+It requires some cleverness to use the link monad to bind more than
+one variable at a time.  Whereas in the standard reader monad a single
+environment can record any number of variable assignments, because
+Jacobson's monad only tracks a single dependency, binding more than
+one pronoun requires layering the monad, so that intermediate regions
+of the computation will be functors inside of a link monad box inside
+another link monad box, and so on.  
+
+[Give details of the readings of *Everyone said someone thinks that he
+likes her*.  Jacobson needs to add a variant of g; is it necessary to 
+write a link swap that reverses the nesting of the monad boxes?]