lux/data/struct/vector
Types
Vector
(type: (Vector a)
{#level Level
#size lux;Nat
#root (Hierarchy a)
#tail (Base a)})
Macros
vector
## Vector literals.
(vector 10 20 30 40)
Structs
Applicative<Vector>
(lux/control/applicative;Applicative Vector)
(Eq<Node> Eq<a>)
(All [a] (-> (lux/control/eq;Eq a) (lux/control/eq;Eq (Node a))))
(Eq<Vector> Eq<a>)
(All [a] (-> (lux/control/eq;Eq a) (lux/control/eq;Eq (Vector a))))
Fold<Vector>
(lux/control/fold;Fold Vector)
Functor<Vector>
(lux/control/functor;Functor Vector)
Monad<Vector>
(lux/control/monad;Monad Vector)
Monoid<Vector>
(All [a] (lux/control/monoid;Monoid (Vector a)))
Values
(add val vec)
(All [a] (-> a (Vector a) (Vector a)))
(at idx vec)
(All [a] (-> lux;Nat (Vector a) (lux;Maybe a)))
empty
Vector
empty?
(All [a] (-> (Vector a) lux;Bool))
(from-list list)
(All [a] (-> (lux;List a) (Vector a)))
(member? a/Eq vec val)
(All [a] (-> (lux/control/eq;Eq a) (Vector a) a lux;Bool))
(pop vec)
(All [a] (-> (Vector a) (Vector a)))
(put idx val vec)
(All [a] (-> lux;Nat a (Vector a) (Vector a)))
(size vector)
(All [a] (-> (Vector a) lux;Nat))
(to-list vec)
(All [a] (-> (Vector a) (lux;List a)))
(update idx f vec)
(All [a] (-> lux;Nat (-> a a) (Vector a) (Vector a)))