require 'enumerator' module External module Enumerable # def all? # :yield: obj # not_implemented # end # def any? # :yield: obj # not_implemented # end # def collect # :yield: item # not_implemented # end # def collect! # :yield: item # not_implemented # end # def detect(ifnone=nil) # :yield: obj # not_implemented # end # def each_cons(n) # :yield: # not_implemented # end # def each_slice(n) # :yield: # not_implemented # end def each_with_index(&block) chunk do |offset, length| self[offset, length].each_with_index do |item, i| yield(item, i + offset) end end end # def entries # to_a # end # def enum_cons(n) # not_implemented # end # def enum_slice(n) # not_implemented # end # def enum_with_index # not_implemented # end # def find(ifnone=nil, &block) # :yield: obj # detect(ifnone, &block) # end # def find_all # :yield: obj # not_implemented # end # def grep(pattern) # :yield: obj # not_implemented # end # def include?(obj) # not_implemented # end # def inject(init) # :yield: memo, obj # not_implemented # end # def map(&block) # :yield: item # collect(&block) # end # def map!(&block) # :yield: item # collect!(&block) # end # def max # :yield: a,b # not_implemented # end # def member?(obj) # include?(obj) # end # def min # :yield: a,b # not_implemented # end # def partition # :yield: obj # not_implemented # end # def reject # :yield: item # not_implemented # end # def reject! # :yield: item # not_implemented # end # def select(&block) # :yield: obj # find_all(&block) # end # def sort # :yield: a,b # not_implemented # end # def sort! # :yield: a,b # not_implemented # end # def sort_by # :yield: obj # not_implemented # end # def to_a # not_implemented # end # def to_set(klass=Set, *args, &block) # not_implemented # end # def zip(*arg) # :yield: arr # not_implemented # end end end