operator [] method Null safety
- int index
Access the index
th 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();
}
}