map<Z> method

Option<Z> map<Z>(
  1. Z f(
    1. A a
    )
)

Return Some of Application of f on a inside Some if isDefined else None

Implementation

Option<Z> map<Z>(Z Function(A a) f) => fold(_none, (A a) => _some(f(a)));