Optional
@frozen
enum Optional<Wrapped> : ExpressibleByNilLiteral
-
Converts this optional to an
Either.rightvalue, providing a default value if it is nil.Declaration
Swift
func rightIfNotNull<A>(_ f: @autoclosure () -> A) -> Either<A, Wrapped>Parameters
fDefault value provider.
Return Value
A right value containing the wrapped value, or a left with the provided default value.
-
Converts this Optional value into a
Bow.Option.This is an alias for
Optional.k().Declaration
Swift
public func toOption() -> Option<Wrapped>Return Value
An Option value with the same structure as this value.
-
Converts this Optional value into a
Bow.Option.This is an alias for
Optional.k().Declaration
Swift
public func k() -> Option<Wrapped>Return Value
An Option value with the same structure as this value.
Install in Dash
Optional Extension Reference