map<R> method
Transforms the value if present using mapper.
Implementation
Optional<R> map<R>(R Function(T value) mapper) => switch (this) {
Some(:final value) => Some<R>(mapper(value)),
None() => None<R>(),
};
Transforms the value if present using mapper.
Optional<R> map<R>(R Function(T value) mapper) => switch (this) {
Some(:final value) => Some<R>(mapper(value)),
None() => None<R>(),
};