inspect method

Option<T> inspect(
  1. dynamic f(
    1. T
    )
)

Calls the provided closure with a reference to the contained value

Implementation

@pragma("vm:prefer-inline")
Option<T> inspect(Function(T) f) {
  if (v == null) {
    return this;
  } else {
    f(v!);
    return this;
  }
}