
29 Jan
2013
29 Jan
'13
5:33 a.m.
Junior White
So this is a problem in lazy evaluation language, it will not appear in python or erlang, am i right?
Not quite. Compilers of imperative languages don’t perform CSE (common subexpression elimination) either; `queens' (k-1)` could have some side effects, after all, and performing a side effect only once instead of n times is a definite bug.