An implementation of Enumerator#next, #peek and #reset for Rubymotion
In order to use this in your project, copy stepping_enumerator.rb and gcd_fiber.rb into your project’s load path.
This code monkey-patches the stepping methods (#next, #peek and #reset) into the core Enumerator class.
a = [1,2,3] e = a.to_enum p e.next #=> 1 p e.next #=> 2 p e.next #=> 3 p e.next #raises StopIteration
Grand Central Dispatch-based Fiber implementation originally by Al Skipp.
See LICENSE.txt file for copyright information.