BooleanSyntax
Syntax for treating booleans as indicators of success or failure in a computation.
The simplest usage is something like: myBoolean ~>? "Is my boolean true?"
. The 'value'
and log tree of the returned treelog.LogTreeSyntax.DescribedComputation will indicate success or failure
depending on the value of myBoolean
.
Value members
Concrete methods
Use different descriptions for the true
and false
cases. Note that unlike 'if'
the false
/ failure description is the first parameter and the true
/ success
description is the second parameter. This is to maintain consistency with OptionSyntax
and EitherSyntax.
Use different descriptions for the true
and false
cases. Note that unlike 'if'
the false
/ failure description is the first parameter and the true
/ success
description is the second parameter. This is to maintain consistency with OptionSyntax
and EitherSyntax.
If the boolean is true
the 'value' of the returned DescribedComputation will be \/-(true)
,
otherwise, the 'value' will be -\/(description)
.
Use the same description whether the boolean is true
or false
.
Equivalent to ~>?(description, description)
Use the same description whether the boolean is true
or false
.
Equivalent to ~>?(description, description)
Syntactic sugar equivalent to describedBy(description)
Syntactic sugar equivalent to describedBy(description)
Syntactic sugar equivalent to decribedWith(failureDescription, successDescription)
Syntactic sugar equivalent to decribedWith(failureDescription, successDescription)