pub fn gt<A, AV, B, BV>(a: AV, b: BV) -> impl Goalwhere
A: Unify + PartialOrd<B>,
B: Unify,
AV: Into<Value<A>>,
BV: Into<Value<B>>,
Expand description
Ensure that one value is greater than another.
Example:
use canrun::{unify, all, LVar, Query};
use canrun::cmp::gt;
let (x, y) = (LVar::new(), LVar::new());
let goal = all![
unify(x, 2),
unify(y, 1),
gt(x, y)
];
let results: Vec<_> = goal.query((x, y)).collect();
assert_eq!(results, vec![(2, 1)]);