ass9 tweak
[lambda.git] / state_monad_tutorial.mdwn
index bac9124..6502014 100644 (file)
@@ -100,8 +100,8 @@ Here is how you'd have to do it using our OCaml monad library:
        # let increment_store'' : ('x,'a) S.m =
                S.(get >>= fun cur ->
                   let value = cur.total
-                  in let s = { total = succ cur.total; modifications = succ cur.modifications }
-           in put s >> unit value);;
+                  in let s' = { total = succ cur.total; modifications = succ cur.modifications }
+           in put s' >> unit value);;
 
 Let's try it out:
 
@@ -170,7 +170,7 @@ What are the special-purpose operations that the `State_monad` module defines fo
 
                ... >> put new_store >> fun () -> ...
 
-       As that code snippets suggests, the boxed value after the application of `puts new_store` is just `()`. If you want to preserve the existing boxed value but replace the store, do this:
+       As that code snippet suggests, the boxed value after the application of `puts new_store` is just `()`. If you want to preserve the existing boxed value but replace the store, do this:
 
                ... >>= fun value -> put new_store >> unit value >>= ...