def take_while(&predicate)
      filter("take_while") do |yielder, all_done|
        each do |element|
          throw all_done unless yield(element)
          yielder.call(element)
        end
      end
    end
def take_while(&predicate)
      filter("take_while") do |yielder, all_done|
        each do |element|
          throw all_done unless yield(element)
          yielder.call(element)
        end
      end
    end
Select elements while a predicate returns true.

 @return [Enumerable] all elements before the first that fails the predicate

 @see ::Enumerable#take_while