keen/col/experimental/list
Sourcelist[t] record (has private fields)to[t] t[](a t list)Convert a list to an array. This is O(
a size). This is O(1) if the list was converted from an array, meaning a round trip is free.~~[t] t list(a t list, b t list)Concatenate two lists. This is O(log n), where
n is the size of the smaller list.~[t] t list(a t, b t list)Prepend an element to a list. This is amortized O(1), with worst case O(
a.size log).~[t] t list(a t list, b t)Append an element to a list. This is amortized O(1), with worst case O(
a.size log).list-mut-iterator[t] record (has private fields)
Immutable list type.
This type is designed so concatenation (
~and~~) will be efficient. It also is efficient to split from an iterator.It does not support efficient access by an index, so iterators should be used instead.