abstract class Cl::DS::LinkedList(I)
- Cl::DS::LinkedList(I)
- Reference
- Object
Included Modules
- Iterator(I)
Direct Known Subclasses
Defined in:
data_structures/linked_list.crClass Method Summary
Instance Method Summary
-
#each(&)
Calls the given block once for each element, passing that element as a parameter.
-
#empty? : Bool
Returns
true
ifself
is empty,false
otherwise. -
#next : I | Iterator::Stop
Returns the next element in this iterator, or
Iterator::Stop::INSTANCE
if there are no more elements. - #next?
- #peak : I | Nil
- #push(item : I)
Class Method Detail
Instance Method Detail
def each(&)
#
Description copied from module Iterator(I)
Calls the given block once for each element, passing that element as a parameter.
iter = ["a", "b", "c"].each
iter.each { |x| print x, " " } # Prints "a b c"
def empty? : Bool
#
Description copied from module Enumerable(I)
Returns true
if self
is empty, false
otherwise.
([] of Int32).empty? # => true
([1]).empty? # => false
def next : I | Iterator::Stop
#
Description copied from module Iterator(I)
Returns the next element in this iterator, or Iterator::Stop::INSTANCE
if there
are no more elements.