Function canrun::goals::ops::mul

source ·
pub fn mul<T, A, B, C>(a: A, b: B, c: C) -> impl Goalwhere
    T: Unify + Mul<Output = T> + Div<Output = T> + Copy,
    A: Into<Value<T>>,
    B: Into<Value<T>>,
    C: Into<Value<T>>,
Expand description

Multiply two values together.

Example:

use canrun::{unify, LVar, Query};
use canrun::ops::mul;

let x = LVar::new();
let goal = mul(2, 3, x);
let results: Vec<_> = goal.query(x).collect();
assert_eq!(results, vec![6]);