get method

Option<T> get(
  1. int index
)

Implementation

Option<T> get(int index) {
  if (index < 0 || index >= len()) {
    return None;
  }
  return Some(getUnchecked(index));
}