PF2d::ThreadedBinaryTree(T)
Inherits Enumerable < Struct < Value < Object
Constructors
new(compare : T, T -> Int32, on_collision : Nil | T, T -> T)
Sourcenew
SourceInstance methods
<<(value : T)
Sourceclear
Sourcecompare
Sourcecompare=(compare : T, T -> Int32)
Sourcefirst
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
on_collision
Sourceon_collision=(on_collision : T, T -> T | Nil)
Sourcevalues
Sourcevalues=(values : Array(Node(T)))
Source