Skip to main content

PredicateModule

Type Alias PredicateModule 

Source
pub type PredicateModule = &'static [(&'static str, usize, PredicateFunction)];
Expand description

A predicate module: a static slice of (name, arity, function) entries.

ยงExample

use prolog2::predicate_modules::{PredicateModule, PredReturn};

static MY_MODULE: PredicateModule = &[
    ("always_true", 0, |_heap, _hyp, _goal, _pt, _cfg| PredReturn::True),
];