andThen<U> method

  1. @override
Option<U> andThen<U>(
  1. Option<U> f(
    1. T self
    )
)
override

Returns None if the option is None, otherwise calls f with the wrapped value and returns the result. Some languages call this operation flatmap.

Implementation

@override
Option<U> andThen<U>(Option<U> Function(T self) f) {
  return f(v);
}