map<A, B> function

Option<B> Function(Option<A>) map<A, B>(
  1. B mapper(
    1. A
    )
)

Implementation

Option<B> Function(Option<A>) map<A, B>(
  B Function(A) mapper,
) =>
    (option) => match(
          onNone: None<B>(),
          onSome: (A value) => Some(
            mapper(value),
          ),
        )(option);