[Haskell-cafe] Are constructors strict?
Edward Z. Yang
ezyang at MIT.EDU
Thu Jan 20 23:16:20 CET 2011
Hello Daryoush,
That is a good question, and depends on distinguishing between laziness
and nondeterminism. Suppose I have a normal, lazily evaluated list:
[1,2...]
There are thunks used in this case, but the end result is fully deterministic:
the next will always be 3, and then 4, and so on. So thunks don't
give us nondeterminism; we need some other mechanism (whether it's another
list encoding the choices, or a more sophisticated backtracking monad.)
Edward
More information about the Haskell-Cafe
mailing list