I had no idea the gang of four had appropriated that word too. My bad. I really did mean the category theory functor, not whatever its other meaning is.
However useful or not category theory is for producing new proofs, I found it enlightening and am glad this was posted.
DON'T start functional programming with monads. Familiarize with currying, pattern matching, how to create data types in Haskell, using recursion instead of loops, higher order functions, list comprehensions, type classes, polymorphism in Haskell (different than subtyping in OOP). Ignore monads for a while. To understand monads you must have a good grip of those concepts. You can start with http://learnyouahaskell.com/chapters.
You'll see Haskell tutorials delay telling about the concept. There's a reason.
The really amusing thing is that (at least on my machine) it's pv that's the bottleneck there; I have it using 101% cpu, anyhow. pv will give me 9.7GB/s, whereas dd will give me 13.3GB/s (also at 100% cpu). I wonder if anything's faster than dd :)
In Haskell they don't - you might write this "producer-consumer" composing a function that produces a stream with a function that consumes a stream. How would you approach that problem in C++?
You can simply modify your definition of "simplest" to be "shortest that completes in a million steps" or some such. A program that takes so long to finish that you're not sure it will return your desired value is probably not the simplest.