Method: Immutable::Consable#+

Defined in:
lib/immutable/consable.rb

#+(xs) ⇒ Consable

Appends two Consable objects self and xs.

Parameters:

  • xs (Consable)

    the Consable object to append.

Returns:



101
102
103
# File 'lib/immutable/consable.rb', line 101

def +(xs)
  foldr(xs) { |y, ys| Cons(y, ys) }
end