lastOrElse method
E
lastOrElse(
- E defaultValue
Last element or defaultValue
if the collection is empty.
Implementation
E lastOrElse(E defaultValue) => isNotEmpty ? last : defaultValue;
Last element or defaultValue
if the collection is empty.
E lastOrElse(E defaultValue) => isNotEmpty ? last : defaultValue;