module Iterable

Overview

The Iterable mixin provides convenince methods to collection classes that provide an #each method that returns an Iterator over the collection.

Direct including types

Array(T), Dir, Matrix(T), Range(B, E), Set(T), Slice(T), Tuple(T*)

Defined in:

Instance Method Summary

Instance Method Detail

def cycle

Same as each.cycle.


def cycle(n)

Same as each.cycle(n).


abstract def each

Must return an Iterator over the elements in this collection.


def each_cons(count : Int)

Same as each.cons(count).


def each_slice(count : Int)

Same as each.slice(count).


def each_with_index(offset = 0)

Same as each.with_index(offset).


def each_with_object(obj)

Same as each.with_object(obj).