init property

Option<Iterable<T>> init

Return all the elements of a list except the last one. If the list is empty, return None.

Implementation

Option<Iterable<T>> get init => isEmpty ? none() : some(take(length - 1));