Class: Abstractivator::Cons::Cell

Inherits:
Array show all
Defined in:
lib/abstractivator/cons.rb

Instance Method Summary collapse

Methods inherited from Array

#key, #to_proc, #value

Constructor Details

#initialize(h, t) ⇒ Cell

Returns a new instance of Cell.



44
45
46
# File 'lib/abstractivator/cons.rb', line 44

def initialize(h, t)
  super([h, t])
end

Instance Method Details

#headObject



48
49
50
# File 'lib/abstractivator/cons.rb', line 48

def head
  first
end

#tailObject



52
53
54
# File 'lib/abstractivator/cons.rb', line 52

def tail
  last
end