Indexed Collections have incrementing numeric keys. They exhibit
slightly different behavior than Collection.Keyed for some methods in order
to better mirror the behavior of JavaScript's Array, and add methods
which do not make sense on non-indexed Collections such as indexOf.
Unlike JavaScript arrays, Collection.Indexeds are always dense. "Unset"
indices and undefined indices are indistinguishable, and all indices from
0 to size are visited when iterated.
All Collection.Indexed methods return re-indexed Collections. In other words,
indices always start at 0 and increment until size. If you wish to
preserve indices, using them as keys, convert to a Collection.Keyed by
calling toKeyedSeq.
Indexed Collections have incrementing numeric keys. They exhibit slightly different behavior than
Collection.Keyed
for some methods in order to better mirror the behavior of JavaScript'sArray
, and add methods which do not make sense on non-indexed Collections such asindexOf
.Unlike JavaScript arrays,
Collection.Indexed
s are always dense. "Unset" indices andundefined
indices are indistinguishable, and all indices from 0 tosize
are visited when iterated.All Collection.Indexed methods return re-indexed Collections. In other words, indices always start at 0 and increment until size. If you wish to preserve indices, using them as keys, convert to a Collection.Keyed by calling
toKeyedSeq
.