pub fn branch<A: Clone + 'static + FromStr, B, TH, EL>(
vm: &mut RoundVM,
cond: B,
thn: TH,
els: EL,
) -> A
Expand description
Partitions the domain into two subspaces that do not interact with each other.
§Arguments
vm
the current VMcond
the condition to evaluatethn
the expression to evaluate if the condition is trueels
the expression to evaluate if the condition is false
§Generic Parameters
A
The type of value returned by the expression.B
- The type of cond, which must be a closure that takes no arguments and returns a value of typebool
.F
- The type of thn and els, which must be a closure that takes aRoundVM
as argument and returns a tuple(RoundVM, A)
.
§Returns
the value of the expression