map<U> method
Maps this Option<T>
to an Option<U>
using the given function with the
held value.
Returns:
See also:
Rust: Option::map()
Implementation
Option<U> map<U>(U Function(T) mapFn) => switch (this) {
Some(value: T value) => Some(mapFn(value)),
None() => None()
};