operator [] method

dynamic operator [](
  1. int index
)

Provides an indexable way to access this tuple's items.

Implementation

dynamic operator [](int index) {
  switch (index) {
    case 0:
      return item;
  }
  throw RangeError.index(index, this, 'index', 'index out of range', 2);
}