def take(n)
      filter("take") do |yielder, all_done|
        if n > 0
          each_with_index do |element, index|
            yielder.call(element)
            throw all_done if index + 1 == n
          end
        end
      end
    end
def take(n)
      filter("take") do |yielder, all_done|
        if n > 0
          each_with_index do |element, index|
            yielder.call(element)
            throw all_done if index + 1 == n
          end
        end
      end
    end
Select the first n elements.

 @param n [Integer] the number of elements to take
 @return [Enumerable] the first N elements

 @see ::Enumerable#take