module Indexable(T)
Overview
A container that allows accessing elements via a numeric index.
Indexing starts at 0
. A negative index is assumed to be
relative to the end of the container: -1
indicates the last element,
-2
is the next to last element, and so on.
Types including this module are typically Array
-like types.
Included Modules
- Enumerable(T)
- Iterable(T)
Direct including types
- Array(T)
- Matrix(T)
- Prime
- SMultiSet::Bucket(T, BUCKET_RATIO, REBUILD_RATIO, BSEARCH)
- SSet::Bucket(T, BUCKET_RATIO, REBUILD_RATIO, BSEARCH)
- Tuple(*T)
Defined in:
point.crcollection/each_pair.cr
Instance Method Summary
Instance methods inherited from module Enumerable(T)
accumulate(init : U) : Array(U) forall Uaccumulate : Array(T)
accumulate(init : U, &block : U, T -> U) : Array(U) forall U
accumulate(&block : T, T -> T) : Array(T) accumulate, mex : T mex, mex_sorted : T mex_sorted, tally(*, default : Int32) : Hash(T, Int32) tally, unique : self
unique(&) : self unique