Earlier quoted context omitted.
Well, for one, it's a bad sieve algorithm. I think a neat algorithm to demonstrate laziness and Haskell clarity would be enumerating the Calkin-Wilf rationals. [0] It's quite a bit longer but demonstrates a number of neat ideas. I'll start first with a derivation which demonstrates all of the structure of the algorithm and then go through a series of mechanical transforms so that by the end I have a one-liner and a c…
I haven't digested it completely yet, but I suspect that the definition of `next` in `allRationals` is incorrect next (a, b, c) = (a, f b, f c) I can't find the declaration for `f` (probably go?)
I wrote a post elaborating the ideas here: http://tel.github.io/2014/07/09/calkin_wilf_for_early-ish_ha...