operator []= method

void operator []=(
  1. int index,
  2. dynamic value
)

Sets the value in the stack at index to value.

Implementation

operator[]=(int index, dynamic value) {
  if (index < 0) index += top + 1; // Resolve index before push
  push(value);
  replace(index);
}