map<U extends Object> method

Option<U> map<U extends Object>(
  1. U f(
    1. T
    )
)

Maps an this Option

Implementation

@pragma("vm:prefer-inline")
Option<U> map<U extends Object>(U Function(T) f) {
  if (v == null) {
    return None;
  } else {
    return Some(f(v!));
  }
}