operator [] method

Expr operator [](
  1. int index
)

Access the indexth element of this list. Returns empty() if the index is out of bounds.

Implementation

Expr operator [](int index) {
  if (_list.length > index) {
    return _list[index];
  } else {
    return empty();
  }
}