LazyChooseParsley
This class exposes a ternary operator on pairs of parsers.
This class exposes a ternary operator on pairs of parsers.
- Value Params
- con
A conversion (if required) to turn elements of
pq
into parsers- pq
The parsers which serve the branches of the if
- Version
1.0.0
Value members
Concrete methods
This is an if statement lifted to the parser level. Formally, this is a selective functor operation, equivalent to (branch b.map(boolToEither) (p.map(const)) (q.map(const))). Note: due to Scala operator associativity laws, this is a right-associative operator, and must be properly bracketed, technically the invokee is the rhs...
This is an if statement lifted to the parser level. Formally, this is a selective functor operation, equivalent to (branch b.map(boolToEither) (p.map(const)) (q.map(const))). Note: due to Scala operator associativity laws, this is a right-associative operator, and must be properly bracketed, technically the invokee is the rhs...
- Value Params
- b
The parser that yields the condition value
- Returns
The result of either
p
orq
depending on the return value of the invokee