Junior White <efi...@gmail.com> писал(а) в своём письме Tue, 29 Jan 2013 12:59:31 +0300:

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.

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to