post links to state monad tutorial
[lambda.git] / monad_library.mdwn
index d7f899a..36b6962 100644 (file)
@@ -101,7 +101,7 @@ Some comments on the design of this library.
 
                module MS = Maybe_monad.T(S);;
 
-       Note that those two layered monads will have slightly different behavior. See our discussion of [[monad transformers]] for details. Also, the outermost monad is the one whose operations are most exposed. If you want to use any of the State-specific operations (like `puts succ`) in the `MS` monad, you'll have to "lift" those operations into the MaybeT interface. The way you do that is like this:
+       Note that those two layered monads will have slightly different behavior. See our discussion of [[monad transformers]] for details. Also, the outermost monad is the one whose operations are most exposed. If you want to use any of the State-specific operations (like `puts succ`) in the `MS` monad, you'll have to "elevate" those operations into the MaybeT interface. The way you do that is like this:
 
                MS.(... >> elevate (S.puts succ) >> ...)
 
@@ -112,7 +112,7 @@ Some comments on the design of this library.
                # let u = S.(unit 1);;
                val u : ('_a, int) S.m = <abstr>
 
-       You'll notice that the monadic type `S.m` is parameterized on *two* type arguments: one of them, `int`, is the type of the wrapped value. What is the other one (`'_a' in the above example)?
+       You'll notice that the monadic type `S.m` is parameterized on *two* type arguments: one of them, `int`, is the type of the wrapped value. What is the other one (`'_a` in the above example)?
 
        The answer is that for most of the monads this second type argument is an idle wheel. The Continuation monad needs both of the type arguments, though, since its monadic type is implemented as: