Why doesn't Haskell sequence these IO actions properly?

后端 未结 2 1087
醉酒成梦
醉酒成梦 2020-11-29 11:08

A friend of mine asked me why was I learning Haskell. To demonstrate the power of Haskell I wrote a small program which displayed a list of prime numbers:

ma         


        
2条回答
  •  隐瞒了意图╮
    2020-11-29 11:47

    This looks more like a buffering than a sequencing problem. What platform are you on? Have you tried forcing unbuffered output?

    hSetBuffering stdout NoBuffering -- from System.IO
    

提交回复
热议问题