From 6ed932a8f76943fe19005e2daba4af260990d8d3 Mon Sep 17 00:00:00 2001 From: jim Date: Sat, 21 Mar 2015 08:58:36 -0400 Subject: [PATCH] tweak --- exercises/assignment5_answers.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/assignment5_answers.mdwn b/exercises/assignment5_answers.mdwn index 9c30527e..b6d2dab9 100644 --- a/exercises/assignment5_answers.mdwn +++ b/exercises/assignment5_answers.mdwn @@ -768,4 +768,4 @@ and that `bool` is any boolean expression. Then we can try the following: match b with true -> y () | false -> n () - that would arguably still be relying on the special evaluation order properties of OCaml's native `match`. You'd be assuming that `n ()` wouldn't be evaluated in the computation that ends up selecting the other branch. That is correct, but to avoid making that assumption, you should instead first select the `y` or `n` result, _and then afterwards_ force the result. That's what we do in the above answer. + that would arguably still be relying on the special evaluation order properties of OCaml's native `match`. You'd be assuming that `n ()` wouldn't be evaluated in the computation that ends up selecting the other branch. Your assumption would be correct, but to avoid making that assumption, you should instead first select the `y` or `n` result, _and then afterwards_ force the result. That's what we do in the above answer. -- 2.11.0