expand about eval order
authorjim <jim@web>
Sat, 21 Mar 2015 14:37:20 +0000 (10:37 -0400)
committerLinux User <ikiwiki@localhost.members.linode.com>
Sat, 21 Mar 2015 14:37:20 +0000 (10:37 -0400)
exercises/assignment5_answers.mdwn

index fb85ba9..5425ac5 100644 (file)
@@ -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.