Method: Functional::Tuple#first

Defined in:
lib/functional/tuple.rb

#firstObject Also known as: head

Returns the first element of the tuple or nil when empty.

Returns:

  • (Object)

    the first element or nil



211
212
213
# File 'lib/functional/tuple.rb', line 211

def first
  @data.first
end