Class: Abstractivator::Cons::Cell

Inherits:
Array
  • Object
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.



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

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

Instance Method Details

#headObject



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

def head
  first
end

#tailObject



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

def tail
  last
end