pub fn attempt(r: PrologResult<()>) -> BoolPrologResult
Expand description
Transforms a PrologResult<()>
into a BoolPrologResult, allowing more easy use from an if block.
Example:
if attempt(term.unify(42_u64))? {
// the unification succeeded
} else {
// the unification failed
}