Method: Immutable::List#append
- Defined in:
- lib/immutable/list.rb
#append(other) ⇒ List Also known as: concat, +
Return a List with all items from this List, followed by all items from other.
377 378 379 380 381 382 |
# File 'lib/immutable/list.rb', line 377 def append(other) LazyList.new do next other if empty? Cons.new(head, tail.append(other)) end end |