init::list
init/src/list.mo
pub def List.length {A : Type} (xs : List A) : I64The number of elements. Structural recursion with the direct I64
native: + would go through the Add instance and allocate a
dictionary lookup per element in the compiled backend.
pub def List.get (index : I64) (l : List A) : Option AGet the element at index. Negative and out-of-range indices are
none. The walk uses the direct I64 natives: the previous version
stepped with ==, BOrd.gt and -, whose class dispatch allocates a
dictionary lookup per element in the compiled backend.