Index
The type of integer indicies.
This type can be used to define generic lookup functions over sized functors (Functors with a phantom Size type argument.)
at
(Fn [(Ref (Index (a (Size b) Opaque) Int) c)] (Ref Int c))
gets the at
property of a Index
.
copy
(Fn [(Ref (Index (a (Size b) Opaque) Int) c)] (Index (a (Size b) Opaque) Int))
copies the Index
.
delete
(Fn [(Index (a (Size b) Opaque) Int)] ())
deletes a Index
. Should usually not be called manually.
index-to-int
(Fn [(Ref (Index (a (Size b) Opaque) Int) c)] Int)
(index-to-int ix)
Converts an index to a safe integer value, for sized functor element access.
The integer value will always be lesser than the `Size` encoded in the `Index`.
set-at
(Fn [(Index (a (Size b) Opaque) Int), Int] (Index (a (Size b) Opaque) Int))
sets the at
property of a Index
.
set-at!
(Fn [(Ref (Index (a (Size b) Opaque) Int) c), Int] ())
sets the at
property of a Index
in place.
update-at
(Fn [(Index (a (Size b) Opaque) Int), (Ref (Fn [Int] Int c) d)] (Index (a (Size b) Opaque) Int))
updates the at
property of a Index
using a function f
.