
3 Jun
2020
3 Jun
'20
9:27 a.m.
On Wed, Jun 03, 2020 at 07:38:51PM +0800, ☂Josh Chia (謝任中) wrote:
The type of "SP.mapM_ putStrLn str" is IO (), so I don't think "SP.length_ (SP.mapM_ putStrLn str)" type checks, unless I'm somehow misreading your code.
I meant `SP.mapM`. This works: doit :: Stream (Of String) IO () -> IO () doit str = SP.length_ (SP.mapM putStrLn str) >>= Prelude.print `copy` is an intruiging solution though!