I am having serious difficulty coming up with a definition for condition in the following code. Hoping for an example and insight:
// a computation expression builder class
type Builder() =
.
.
.
[<CustomOperation( "condition",
MaintainsVariableSpaceUsingBind = true )>]
member this.Condition(p, [<ProjectionParameter>] b) =
condition p b
let attemp = AttemptBuilder()
let test =
attempt { let x, y = exp1, exp2
condition booleanExpr(x, y)
return (x, y) }
I presume b is implicitly ( fun x, y -> booleanExpr(x, y) ). The term booleanExpr(x, y) is just some Boolean expression involving x and y.
if/then. The valueconditionis not specifically defined. - Sasha Babaei