• Pattern matches on an Option, handling both Some and None cases.

    Type Parameters

    • A
    • B
    • C

    Parameters

    • onNone: () => B

      Function to handle the None case

    • onSome: (value: A) => C

      Function to handle the Some case

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

    The result of either onNone or onSome based on the Option state