struct
Pf::UPath32
- Pf::UPath32
- Struct
- Value
- Object
Overview
An immutable vector of UInt32s with tree path-specific optimizations.
Included Modules
Defined in:
permafrost/upath32.crConstructors
-
.[] : UPath32
Constructs an empty path.
- .[](*ns : UInt32) : UPath32
Instance Method Summary
-
#[](object)
Calls one of the
#[]?overloads. -
#[]?(index : Int) : UInt32 | Nil
Returns index-th n of this path.
-
#[]?(range : Range) : UPath32 | Nil
Returns a subview of this path.
-
#append(n : UInt32) : UPath32
Inserts n at the back of this path.
-
#each(& : UInt32 -> )
Yields each n in this path, left to right.
-
#goto(n : UInt32) : UPath32
Makes n the tip of this path.
- #inspect(io)
-
#prepend(n : UInt32) : UPath32
Inserts n at the front of this path.
-
#prior : UPath32
Removes the last n of this path.
-
#rest : UPath32
Removes the first n of this path.
-
#size : UInt32
Returns the number of ns in this path.
-
#tip : UInt32
Returns the last n of this path (its tip), or raises
IndexErrorif this path is empty. -
#tip? : UInt32 | Nil
Returns the last n of this path (its tip), or
nilif this path is empty.
Instance methods inherited from module Enumerable(UInt32)
to_pf_bidi
to_pf_bidi,
to_pf_map(& : T -> Tuple(K, V)) : Pf::Map(K, V) forall K, Vto_pf_map to_pf_map, to_pf_set : Pf::Set(T) to_pf_set, to_pf_uset32 : Pf::USet32 to_pf_uset32
Constructor Detail
Instance Method Detail
Inserts n at the back of this path. Returns a modified copy.
Makes n the tip of this path. Returns a modified copy. If this path is empty, does nothing.
Inserts n at the front of this path. Returns a modified copy.
Removes the last n of this path. Returns a modified copy. If this path is empty, does nothing.
Removes the first n of this path. Returns a modified copy. If this path is empty, does nothing.
Returns the last n of this path (its tip), or raises IndexError if this
path is empty.