• Transforms the value inside an Option using the provided function. If the Option is Some(value), returns Some(f(value)). If the Option is None, returns None.

    Type Parameters

    • A
    • B

    Parameters

    • f: (a: A) => B

      The function to apply to the value if it exists

    Returns (option: Option<A>) => Option<B>

    A new Option containing the transformed value