map<U> method
Transforms the contained value, if any, by applying map to it.
Examples
// prints "Some(some: 2)"
print(const Some(2).map((value) => 'some: $value'));
// prints "None"
print(const None<int>().map((value) => 'some: $value'));
Implementation
@override
@useResult
None<U> map<U>(U Function(T value) map) => None<U>();