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
Given that optional optionally contains another optional value, the underlying optional value is returned.
Arguments
optional - ( #some ( #none unit | ... ) | #none any )
Returns
( #none unit | ... )
Returns true if optional does not have a value.
Arguments
optional - ( #some any | #none any )
Returns
bool
Returns true if optional has a value.
Arguments
optional - ( #some any | #none any )
Returns
bool
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 | ... )
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 | ... )
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
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