As a side note, even though GHC seems to handle this properly, I would
force the value of 'i' before passing data to the continuation.
Otherwise a less smart compiler may eat memory.  I believe, it can only
eat memory proportional to 'n', but nevertheless real constant space is
better:

    seq i $ k ch >>== (\step -> printDots >> loop i step)


Greets,
Ertugrul


-- 
nightmare = unsafePerformIO (getWrongWife >>= sex)
http://ertes.de/



_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to