andThen<U extends Object> method
Returns None
if the option is None
, otherwise calls op
with the
wrapped value and returns the result.
Implementation
Option<U> andThen<U extends Object>(Option<U> Function(T) op) {
final val = toNullable();
return val != null ? op(val) : None<U>();
}