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

instantiate

(Fn [(Ref (Index (a (Size b) Opaque) Int) c)] (Ref Int c))

gets the at property of a Index.

copy

template

(Fn [(Ref (Index (a (Size b) Opaque) Int) c)] (Index (a (Size b) Opaque) Int))

copies the Index.

delete

template

(Fn [(Index (a (Size b) Opaque) Int)] ())

deletes a Index. Should usually not be called manually.

index-to-int

defn

(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`.

init

template

(Fn [Int] (Index (a (Size b) Opaque) Int))

creates a Index.

prn

template

(Fn [(Ref (Index (a (Size b) Opaque) Int) c)] String)

converts a Index to a string.

set-at

instantiate

(Fn [(Index (a (Size b) Opaque) Int), Int] (Index (a (Size b) Opaque) Int))

sets the at property of a Index.

set-at!

instantiate

(Fn [(Ref (Index (a (Size b) Opaque) Int) c), Int] ())

sets the at property of a Index in place.

str

template

(Fn [(Ref (Index (a (Size b) Opaque) Int) c)] String)

converts a Index to a string.

update-at

instantiate

(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.