Class Enumerable

Allows an object to iterate over its elements in a generic for loop.

Provides an enumerator that can be used in a generic for loop similar to pairs or ipairs.

Functions

Enumerable.new() Creates a new Enumerable interface instance.

Methods

Enumerable:Enumerator() Creates an enumerator for the object.


Functions

Methods
Enumerable.new()
Creates a new Enumerable interface instance. This should only be used when implementing a new Enumerable.

Access:

    private

Returns:

    the new Enumerable interface

Methods

Enumerable:Enumerator()
Creates an enumerator for the object. The enumerator can be used directly in a generic for loop similar to pairs or ipairs.

Returns:

  1. the enumerator generator
  2. the invariant state
  3. the control variable state
generated by LDoc 1.4.6 Last updated 2022-03-30 00:04:00