2 3 4
# File 'lib/lab42/core/enumerable.rb', line 2 def grep2 expr partition{ |ele| expr === ele } end
3 4 5
# File 'lib/lab42/core/console_tools/enumerable.rb', line 3 def mm *args map &B(*args) end
7 8 9 10 11 12 13 14 15 16 17 18
# File 'lib/lab42/core/enumerable.rb', line 7 def to_proc this = self yielder = to_enum.lazy -> do yielder.next end .extend( Module.new do define_method :reset! do yielder = this.to_enum.lazy end end) end