From 63c5183b53d49ec1723ec75c24730c548f75780d Mon Sep 17 00:00:00 2001 From: Jim Pryor Date: Sun, 21 Nov 2010 13:38:54 -0500 Subject: [PATCH] week9 tweak Signed-off-by: Jim Pryor --- week9.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/week9.mdwn b/week9.mdwn index 2d3efc1e..85cbdef0 100644 --- a/week9.mdwn +++ b/week9.mdwn @@ -418,8 +418,8 @@ The `fun _ ->` part here discards the value wrapped by `some_existing_state_mona The other operation for the State monad will be to update the existing store to a new one. This operation looks like this: - let set_state (value : int) : dummy state = - fun s -> (dummy, value);; + let set_state (new_store : int) : dummy state = + fun s -> (dummy, new_store);; If we want to stick this in a `... >>= ...` chain, we'll need to prefix it with `fun _ ->` too, like this: -- 2.11.0