macro_rules! pred {
($functor:expr) => { ... };
($functor:expr, $($term:expr),*) => { ... };
}
Expand description
Creates a built-in predicate or complex term, and wraps it in a Goal.
§Arguments
- functor
- list of Unifiable terms (If any.)
§Return
§Usage
use suiron::*;
// Make a fail predicate. (No arguments.)
let fail_pred = pred!("fail");
// Make a unify predicate.
let x = logic_var!("$X");
let n = SFloat(3.0);
let unify_pred = pred!("unify", x, n);
println!("{}", unify_pred); // Prints: $X = 3