struct
PF2d::ThreadedBinaryTree(T)
- PF2d::ThreadedBinaryTree(T)
- Struct
- Value
- Object
Included Modules
- Enumerable(T)
Defined in:
pf2d/threaded_binary_tree.crConstructors
Instance Method Summary
- #<<(value : T)
- #clear
- #compare : T, T -> Int32
- #compare=(compare : T, T -> Int32)
-
#each(&)
Must yield this collection's elements to the block.
-
#first
Returns the first element in the collection.
- #on_collision : T, T -> T | Nil
- #on_collision=(on_collision : T, T -> T | Nil)
- #values : Array(Node(T))
- #values=(values : Array(Node(T)))
Constructor Detail
Instance Method Detail
def each(&)
#
Description copied from module Enumerable(T)
Must yield this collection's elements to the block.
def first
#
Description copied from module Enumerable(T)
Returns the first element in the collection. Raises Enumerable::EmptyError
if the collection is empty.
([1, 2, 3]).first # => 1
([] of Int32).first # raises Enumerable::EmptyError