lux/data/struct/array

Types

Array

Mutable arrays.

(type: (Array a)
  (host #Array a))

Structs

(Eq<Array> Eq<a>)

(All [a] (-> (lux/control/eq;Eq a) (lux/control/eq;Eq (Array a))))

Fold<Array>

(lux/control/fold;Fold Array)

Functor<Array>

(lux/control/functor;Functor Array)

Monoid<Array>

(All [a] (lux/control/monoid;Monoid (Array a)))

Values

(clone xs)

(All [a] (-> (Array a) (Array a)))

(copy length src-start src-array dest-start dest-array)

(All [a] (-> lux;Nat lux;Nat (Array a) lux;Nat (Array a) (Array a)))

(filter p xs)

(All [a] (-> (-> a lux;Bool) (Array a) (Array a)))

(find p xs)

(All [a] (-> (-> a lux;Bool) (Array a) (lux;Maybe a)))

(find+ p xs)

Just like 'find', but with access to the index of each value.

(All [a] (-> (-> lux;Nat a lux;Bool) (Array a) (lux;Maybe [lux;Nat a])))

(from-list xs)

(All [a] (-> (lux;List a) (Array a)))

(get i xs)

(All [a] (-> lux;Nat (Array a) (lux;Maybe a)))

(new size)

(All [a] (-> lux;Nat (Array a)))

(occupied array)

Finds out how many cells in an array are occupied.

(All [a] (-> (Array a) lux;Nat))

(put i x xs)

(All [a] (-> lux;Nat a (Array a) (Array a)))

(remove i xs)

(All [a] (-> lux;Nat (Array a) (Array a)))

(size xs)

(All [a] (-> (Array a) lux;Nat))

(to-list array)

(All [a] (-> (Array a) (lux;List a)))

(vacant array)

Finds out how many cells in an array are vacant.

(All [a] (-> (Array a) lux;Nat))