puts "TEST" class LazyMap include Enumerable def initialize(stuff, &map_block) @stuff = stuff @map_block = map_block end def each @stuff.each{|x| yield @map_block.call(x)} end end class Foo include Enumerable def each (1..5).to_a.each do |x| yield x end end end e = LazyMap.new(Foo.new, &:to_s) puts "Max #{e.find{|x| x == "2"}}"