Method: Functional::Tuple#concat

Defined in:
lib/functional/tuple.rb

#concat(other) ⇒ Functional::Tuple Also known as: +

Returns a new tuple built by concatenating the two tuples together to produce a third tuple.

Parameters:

  • other (Array)

    the tuple or array-like object (responds to ‘to_a`) to operate on

Returns:



108
109
110
# File 'lib/functional/tuple.rb', line 108

def concat(other)
  Tuple.new(@data + other.to_a)
end