Class Rake::LinkedList
In: lib/rake/linked_list.rb
Parent: Object

Polylithic linked list structure used to implement several data structures in Rake.

Methods

==   conj   cons   each   empty   empty?   inspect   make   new   to_s  

Included Modules

Enumerable

Classes and Modules

Class Rake::LinkedList::EmptyLinkedList

Constants

EMPTY = EmptyLinkedList.new

Attributes

head  [R] 
tail  [R] 

Public Class methods

Cons a new head onto the tail list.

The standard empty list class for the given LinkedList class.

Make a list out of the given arguments. This method is polymorphic

Public Instance methods

Lists are structurally equivalent.

Polymorphically add a new element to the head of a list. The type of head node will be the same list type as the tail.

For each item in the list.

Is the list empty? .make guards against a list being empty making any instantiated LinkedList object not empty by default You should consider overriding this method if you implement your own .make method

Same as to_s, but with inspected items.

Convert to string: LL(item, item…)

[Validate]