For what it's worth I saw the problems in your counting examples right
away, without reading the explanatory text below.
Yes, they were pretty obvious with enough experience. For beginners I
expect it to be a rather insidious trap.
Beginners or anybody coding Haskell while not completely awake. ;-)
Hopefully that means
that it's possibly to learn how to spot such things without resorting
to e.g. running the program or reading Core *gasp*.
Within limits. Detrimental laziness or strictness can be arbitrarily well
hidden.
I agree. Unfortunately... :-/
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe