head property Null safety
Get the first element of the list. If the list is empty, return None.
Same as firstOption
.
Implementation
Option<T> get head => isEmpty ? none() : some(first);
Get the first element of the list. If the list is empty, return None.
Same as firstOption
.
Option<T> get head => isEmpty ? none() : some(first);