From: Intransition Date: 2010-04-03T22:30:37+09:00 Subject: Re: combined ranges... Here, I worked on it I came up with: module Enumerable def visit(type=Enumerable, &block) if block_given? each do |e| case e when type e.visit(type, &block) else block.call(e) end end else to_enum(:visit, type) end end end I am going to add this to Facets, but I have to decide for sure on the name. Which is better? #visit #traverse #recurse other ?