From: jim Date: Sat, 21 Mar 2015 14:37:20 +0000 (-0400) Subject: expand about eval order X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=commitdiff_plain;h=155b996c1975e17a34ecdd0e23f2dba9fea8b879 expand about eval order --- diff --git a/exercises/assignment5_answers.mdwn b/exercises/assignment5_answers.mdwn index fb85ba91..5425ac51 100644 --- a/exercises/assignment5_answers.mdwn +++ b/exercises/assignment5_answers.mdwn @@ -713,7 +713,7 @@ Do these last three problems specifically with OCaml in mind, not Haskell. Analo m. let _ = blackhole in 2 n. let _ = blackhole () in 2 - ANSWERS: These terminate: a,c,e,f,g,j,m; these don't: b,d,h,i,k,l,n. Generalization: blackhole is a suspended infinite loop, that is forced by feeding it an argument. The expressions that feed blackhole an argument (in a context that is not itself an unforced suspension) won't terminate. + ANSWERS: These terminate: a,c,e,f,g,j,m; these don't: b,d,h,i,k,l,n. Generalization: blackhole is a suspended infinite loop, that is forced by feeding it an argument. The expressions that feed blackhole an argument (in a context that is not itself an unforced suspension) won't terminate. Also, unselected clauses of `if`-terms aren't ever evaluated. 25. This problem aims to get you thinking about how to control order of evaluation. Here is an attempt to make explicit the behavior of `if ... then ... else ...` explored in the previous question.