From 374ac1a8ce12600e5e0d6055f038ae3337bd4177 Mon Sep 17 00:00:00 2001 From: Chris Barker Date: Sun, 7 Nov 2010 21:47:17 -0500 Subject: [PATCH] Jacobson as a monad --- week8.mdwn | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/week8.mdwn b/week8.mdwn index 4388e440..7f42092d 100644 --- a/week8.mdwn +++ b/week8.mdwn @@ -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?] -- 2.11.0