uses combinators to impose binding relationships between argument
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
+monads, Jacobson's system is essentially a Reader monad in which the
assignment function threaded through the computation is limited to at
most one variable. It will turn out that Jacobson's geach combinator
*g* is exactly our `lift` operator, and her binding combinator *z* is
before you are about to combine with the binder, when you finish off
with *z*. (There are examples with longer chains of *g*'s below.)
-Last week we saw a reader monad for tracking variable assignments:
+Last week we saw a Reader monad for tracking variable assignments:
<pre>
type env = (char * int) list;;
idea is that a list like `[('a', 2); ('b',5)]` associates the variable
`'a'` with the value 2, and the variable `'b'` with the value 5.
-Combining this reader monad with ideas from Jacobson's approach, we
+Combining this Reader monad with ideas from Jacobson's approach, we
can consider the following monad:
<pre>
</pre>
I've called this the *link* monad, because it links (exactly one)
-pronoun with a binder, but it's a kind of reader monad. (Prove that
+pronoun with a binder, but it's a kind of Reader monad. (Prove that
`ap`, the combinator for applying a linked functor to a linked object,
can be equivalently defined in terms of `bind` and `unit`.)
type `e`. It is easy to make the monad polymorphic in the type of the
linked value, which will be necessary to handle, e.g., paycheck pronouns.
-In the standard reader monad, the environment is an assignment
+In the standard Reader monad, the environment is an assignment
function. Here, instead this monad provides a single value. The idea
is that this is the value that will be used to replace the pronoun
linked to it by the monad.
order), but returns something that is not in the monad. Rather, it
will be a function from individuals to a computation in which the
pronoun in question is bound to that individual. We could emphasize
-the parallel with the reader monad even more by writing a `shift`
+the parallel with the Reader monad even more by writing a `shift`
operator that used `unit` to produce a monadic result, if we wanted to.
The monad version of *Everyone_i thinks he_i left*, then (remembering
So *g* is exactly `lift` (a combination of `bind` and `unit`), and *z*
is exactly `bind` with the arguments reversed. It appears that
-Jacobson's variable-free semantics is essentially a reader monad.
+Jacobson's variable-free semantics is essentially a Reader monad.
-One of Jacobson's main points survives: restricting the reader monad
+One of Jacobson's main points survives: restricting the Reader monad
to a single-value environment eliminates the need for variable names.
Binding more than one variable at a time
----------------------------------------
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
+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. (Jacobson provides some