def first(n=nil, *args)
      res = take(n || 1, *args)
      n.nil? ? res.first : res
    end
def first(n=nil, *args)
      res = take(n || 1, *args)
      n.nil? ? res.first : res
    end
Returns the first element, or the first +n+ elements, of the pattern.

 If the pattern is empty, the first form returns nil, and the second form
 returns an empty array.

 @see #take

 @param n [Integer]
 @param args same arguments as {#take}
 @return [Object, Array]