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) {
return switch (this) {
Some(:T v) => Some(mapFn(v)),
None() => None(),
};
}