def flatten(level = 1)
      filter("flatten") do |yielder|
        each do |element|
          if level > 0 && element.respond_to?(:each)
            element.flatten(level - 1).each(&yielder)
          else
            yielder.call(element)
          end
        end
      end
    end
def flatten(level = 1)
      filter("flatten") do |yielder|
        each do |element|
          if level > 0 && element.respond_to?(:each)
            element.flatten(level - 1).each(&yielder)
          else
            yielder.call(element)
          end
        end
      end
    end
Flatten the collection, such that Enumerable elements are included inline.

 @return [Enumerable] elements of elements of the collection

 @see ::Array#flatten