If I have an Enumerator which yields elements of a mathematical series
(logistic map), I can use:
enum.first(10) to get the first 10 value,
enum.next to get the next values,
but there is no enum.next(10) to get the next 10 values.
I do some trickery like this to achieve the same result (because I need
the result in an Array, as #first returns it):
(0…20).map {(lm.next)}
Is there a nicer way to do it? (Or did I overlook some existing method
in Enumerable?)
At first I thought it is logical that #next should have a parameter so
the #first(10) method could be actually a #rewind + #next(10).