Submodules
Constants
Procedures
expect

Returns the value contained by optional. This procedure shall be used if there is good reason to assume that optional will always contain a value, and the reasoning for this shall be passed for reason. If optional does not contain a value, the a panic with the given message reason will be triggered.

Arguments

optional - ( #some any | #none any )

reason - str

Returns

any

flatten

Given that optional optionally contains another optional value, the underlying optional value is returned.

Arguments

optional - ( #some ( #none unit | ... ) | #none any )

Returns

( #none unit | ... )

is_none

Returns true if optional does not have a value.

Arguments

optional - ( #some any | #none any )

Returns

bool

is_some

Returns true if optional has a value.

Arguments

optional - ( #some any | #none any )

Returns

bool

iter

Returns an iterator that returns the value contained by optional once. If optional does not contain a value, an empty iterator is returned.

Arguments

optional - ( #some any | #none any )

Returns

|| -> ( #next any | #end unit | ... )

map

Returns a new optional value by passing the value possibly contained by optional to mapping.

Arguments

optional - ( #some any | #none any )

mapping - |any| -> any

Returns

( #some any | #none unit | ... )

unwrap_or

Returns either the value contained by optional or default if optional does not contain any.

Arguments

optional - ( #some any | #none any )

default - any

Returns

any

unwrap_or_else

Returns either the value contained by optional or the value returned by f if optional does not contain any.

Arguments

optional - ( #some any | #none any )

f - || -> any

Returns

any