Zafu/Collection/Vectorsource code:
public dependencies: Zafu/Abstract/Eq, Zafu/Abstract/Foldable,
Zafu/Abstract/Hash, Zafu/Abstract/Monoid, Zafu/Abstract/Ord, Zafu/Abstract/Semigroup,
Zafu/Abstract/Traverse
Vectorappend, combine_all, combine_all_option, concat, concat_all, drop, empty, eq_Vector, filter, flat_map, foldable_Vector, foldl, foldr, from_List, get_or, hash_Vector, index, map, ord_Vector, prepend, size, slice, split, split_at, take, to_List, traverse_Vector, updated, zipVector[a]Persistent vector backed by an RRB-style tree.
type Vector[a: +*]
appendAppends a single element to the end of a vector.
references: Vector
def append[a](vec: Vector[a], item: a) -> Vector[a]
combine_allreferences: Vector, Zafu/Abstract/Monoid::Monoid
def combine_all[a](vec: Vector[a], monoid: Zafu/Abstract/Monoid::Monoid[a]) -> a
combine_all_optionreferences: Option, Vector, Zafu/Abstract/Semigroup::Semigroup
def combine_all_option[a](vec: Vector[a], semi: Zafu/Abstract/Semigroup::Semigroup[a]) -> Option[a]
concatConcatenates two vectors.
references: Vector
def concat[a](left: Vector[a], right: Vector[a]) -> Vector[a]
concat_allConcatenates all vectors in a list from left to right.
def concat_all[a](vecs: List[Vector[a]]) -> Vector[a]
dropDrops the first count elements.
def drop[a](vec: Vector[a], count: Int) -> Vector[a]
emptyThe empty vector.
references: Vector
empty: forall a: *. Vector[a]
eq_Vectorreferences: Vector, Zafu/Abstract/Eq::Eq
def eq_Vector[a](eq_item: Zafu/Abstract/Eq::Eq[a]) -> Zafu/Abstract/Eq::Eq[Vector[a]]
filterKeeps elements that satisfy a predicate.
def filter[a](vec: Vector[a], pred: a -> Bool) -> Vector[a]
flat_mapMaps each element to a vector and concatenates the results.
references: Vector
def flat_map[a, b](vec: Vector[a], fn: a -> Vector[b]) -> Vector[b]
foldable_Vectorreferences: Vector, Zafu/Abstract/Foldable::Foldable
foldable_Vector: Zafu/Abstract/Foldable::Foldable[Vector]
foldlLeft fold over all vector elements.
references: Vector
def foldl[a, b](vec: Vector[a], init: b, fn: (b, a) -> b) -> b
foldrRight fold over all vector elements.
references: Vector
def foldr[a, b](vec: Vector[a], init: b, fn: (a, b) -> b) -> b
from_ListBuilds a vector from a list while preserving order.
def from_List[a](list: List[a]) -> Vector[a]
get_orReturns the element at an index, or calls fn when out of bounds.
def get_or[a](vec: Vector[a], idx: Int, fn: () -> a) -> a
hash_Vectorreferences: Vector, Zafu/Abstract/Hash::Hash
def hash_Vector[a](hash_item: Zafu/Abstract/Hash::Hash[a]) -> Zafu/Abstract/Hash::Hash[Vector[a]]
indexReturns the element at an index when it is in bounds.
references: Int, Option, Vector
def index[a](vec: Vector[a], idx: Int) -> Option[a]
mapMaps each element to a new vector while preserving tree shape.
references: Vector
def map[a, b](vec: Vector[a], fn: a -> b) -> Vector[b]
ord_Vectorreferences: Vector, Zafu/Abstract/Ord::Ord
def ord_Vector[a](ord_item: Zafu/Abstract/Ord::Ord[a]) -> Zafu/Abstract/Ord::Ord[Vector[a]]
prependPrepends a single element to the front of a vector.
references: Vector
def prepend[a](vec: Vector[a], item: a) -> Vector[a]
sizeReturns the number of elements in a vector.
def size[a](vec: Vector[a]) -> Int
sliceReturns a slice in the half-open interval [start, end).
def slice[a](vec: Vector[a], start: Int, end: Int) -> Vector[a]
splitBackward-compatible alias for split_at.
references: Int, Tuple2, Vector
def split[a](vec: Vector[a], count: Int) -> (Vector[a], Vector[a])
split_atSplits at count into (take count, drop count).
references: Int, Tuple2, Vector
def split_at[a](vec: Vector[a], count: Int) -> (Vector[a], Vector[a])
takeTakes the first count elements.
def take[a](vec: Vector[a], count: Int) -> Vector[a]
to_ListConverts a vector to a list in element order.
def to_List[a](vec: Vector[a]) -> List[a]
traverse_Vectorreferences: Vector, Zafu/Abstract/Traverse::Traverse
traverse_Vector: Zafu/Abstract/Traverse::Traverse[Vector]
updatedReplaces the element at idx when in bounds.
def updated[a](vec: Vector[a], idx: Int, item: a) -> Vector[a]
zipZips two vectors to the shorter length.
def zip[a, b](left: Vector[a], right: Vector[b]) -> Vector[(a, b)]