Module: Lab42::Nil
Instance Method Summary collapse
Instance Method Details
#cons(new_head) ⇒ Object
23 24 25 |
# File 'lib/lab42/nil.rb', line 23 def cons(new_head) List.cons(new_head, self) end |
#deconstruct ⇒ Object
7 8 9 |
# File 'lib/lab42/nil.rb', line 7 def deconstruct [] end |
#each ⇒ Object
11 12 13 |
# File 'lib/lab42/nil.rb', line 11 def each self end |
#empty? ⇒ Boolean
15 16 17 |
# File 'lib/lab42/nil.rb', line 15 def empty? true end |
#length ⇒ Object
19 20 21 |
# File 'lib/lab42/nil.rb', line 19 def length 0 end |