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