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

Direct including types

Defined in:

point.cr
collection/each_pair.cr

Instance Method Summary

Instance methods inherited from module Enumerable(T)

accumulate(init : U) : Array(U) forall U
accumulate : 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

Instance Method Detail

def [](point : Point) #

[View source]
def []?(point : Point) #

[View source]
def each_pair(&) #

[View source]
def each_pair #

[View source]
def fetch(point : Point, &) #

[View source]