Closed snoyberg closed 6 years ago
(Copying this here from my comment on your blog.) This implementation is insufficiently lazy: otraverse_ putStrLn ("hello" : "world" : ⊥) now evaluates to putStrLn "hello" *> ⊥ instead of putStrLn "hello" *> putStrLn "world" *> ⊥.
otraverse_ putStrLn ("hello" : "world" : ⊥)
putStrLn "hello" *> ⊥
putStrLn "hello" *> putStrLn "world" *> ⊥
(Copying this here from my comment on your blog.) This implementation is insufficiently lazy:
otraverse_ putStrLn ("hello" : "world" : ⊥)
now evaluates toputStrLn "hello" *> ⊥
instead ofputStrLn "hello" *> putStrLn "world" *> ⊥
.