Represent an empty list, using the Null Object Pattern.
When inheriting from the LinkedList class, you should implement a type specific Empty class as well. Make sure you set the class instance variable @parent to the assocated list class (this allows conj, cons and make to work polymorphically).
Methods
Class Public methods
cons(head, tail)
Link
Source: show
# File lib/rake/linked_list.rb, line 95 def self.cons(head, tail) @parent.cons(head, tail) end
Instance Public methods