OptionSyntax
Syntax for treating Options
as indicators of success or failure in a computation.
Syntax for treating Options
as indicators of success or failure in a computation.
The simplest usage is something like: myOption ~>? "Do I have Some?"
. The 'value'
and log tree of the returned treelog.LogTreeSyntax.DescribedComputation will indicate success or failure
depending on the value of myOption
.
Value members
Concrete methods
Use the same description whether the Option is Some
or None
.
Equivalent to log(description, description)
Use the same description whether the Option is Some
or None
.
Equivalent to log(description, description)
Use different descriptions for the Some
and None
cases.
Use different descriptions for the Some
and None
cases.
If the option is Some(x)
the 'value' of the returned DescribedComputation will be \/-(x)
,
otherwise, the 'value' will be -\/(noneDescription)
.
Use different descriptions for the Some
and None
cases, providing the boxed Some
value to the function used to produce the description for the Some
case, so that it can be included in the
description if you wish.
Use different descriptions for the Some
and None
cases, providing the boxed Some
value to the function used to produce the description for the Some
case, so that it can be included in the
description if you wish.
If the option is Some(x)
the 'value' of the returned DescribedComputation will be \/-(x)
,
otherwise, the 'value' will be -\/(noneDescription)
.
Return a default treelog.LogTreeSyntax.DescribedComputation if option
is a None
.
Return a default treelog.LogTreeSyntax.DescribedComputation if option
is a None
.
If the option is Some(x)
the 'value' of the returned DescribedComputation will be \/-(Some(x))
,
otherwise, the returned treelog.LogTreeSyntax.DescribedComputation will be dflt
.