takeFirst method

Option<T> takeFirst()

Implementation

Option<T> takeFirst() {
  if (isEmpty) {
    return None;
  }
  var element = _list[_start];
  _start++;
  return Some(element);
}