We removed all method chaining. Notice filter and take accept a single argument.
Also notice that filtered uses simple function composition to combine the two steps
(_.compose is from underscore, nothing special here).

We are simply composing transducers. If you would like to know how these work, check
out Transducers Explained. The previous examples are all using transducers
behind the scenes. Method chaining is simple composition, _r.generate uses an iterator and
passes on to transduce. Even asCallback uses transducers but steps through the results using
the argument of a callback, instead of reducing over the results.