andThen<B> method

  1. @override
Option<B> andThen<B>(
  1. covariant Option<B> then()
)
override

If this Option is a Some, then return the result of calling then. Otherwise return None.

[🍌].andThen(() => [🍎]) -> [🍎]
[_].andThen(() => [🍎]) -> [_]

Implementation

@override
Option<B> andThen<B>(covariant Option<B> Function() then) =>
    flatMap((_) => then());