Why do we need ‘seq’ or ‘pseq’ with ‘par’ in Haskell?
Ok. I think the following paper answers my question: http://community.haskell.org/~simonmar/papers/threadscope.pdf In summary, the problem with a `par` b `par` a+b and a `par` a+b is the lack of ordering of evaluation. In both versions, the main thread gets to work on a (or sometimes b) immediately, causing the sparks to “fizzle” away immediately since there … Read more