OptTMapTOut Method

Returns None when IsNone; Some(map(Unwrap())) when IsSome.
C#
// session will be None if the user is None; Some of a session for the user when Some.
Opt<Session> session = GetOptionalUser.Map(user => NewSession(user.Secrets));

Definition

Namespace: Orx.Fun.Option
Assembly: Orx.Fun.Option (in Orx.Fun.Option.dll) Version: 1.2.1+ea79806fa5e0e04bfdaef2a1916930e75e2cde74
C#
public Opt<TOut> Map<TOut>(
	Func<T, TOut> map
)

Parameters

map  FuncT, TOut
Mapper function (T -> TOut) to be called with the underlying value when Some.

Type Parameters

TOut

[Missing <typeparam name="TOut"/> documentation for "M:Orx.Fun.Option.Opt`1.Map``1(System.Func{`0,``0})"]

Return Value

OptTOut

See Also