g :: b -> c
f :: r -> a -> b
(g .) . f :: r -> a -> c
[x+1..] -- [x+1, x+2, ..]
The thread that runs main
in a Haskell program is a bound thread (slow). The best way around this problem is just to create a new thread from the main and work in that instead. [Parallelism and Concurrency in Haskell, chapter 15, page 248].