first method
Returns the first element of an iterator, None if empty.
Implementation
Option<T> first() {
final first = _list.firstOrNull;
if (first == null) {
return None;
}
return Some(first);
}
Returns the first element of an iterator, None if empty.
Option<T> first() {
final first = _list.firstOrNull;
if (first == null) {
return None;
}
return Some(first);
}