map<U> abstract 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
@useResult
Option<U> map<U>(U Function(T value) map);