lastOption property

Option<T> lastOption

Get the last element of the list. If the list is empty, return None.

Implementation

Option<T> get lastOption => isEmpty ? none() : some(last);