mapIfPresent

Maps the value of a given optional to another type using a given function.

mapIfPresent
(
alias fn
T
)

Parameters

opt Optional!T

The optional to map.

Return Value

Type: auto

An optional whose type is the return-type of the given fn template argument function.