match_reducted_types

Function match_reducted_types 

Source
pub fn match_reducted_types(left: &Atom, right: &Atom) -> MatchResultIter
Expand description

Matches two types and returns an iterator over resulting bindings.

ยงExamples

use hyperon_atom::{expr, bind};
use hyperon_atom::matcher::Bindings;
use hyperon::metta::types::match_reducted_types;

let bindings: Vec<Bindings> = match_reducted_types(&expr!("List" t), &expr!("List" "A")).collect();

assert_eq!(bindings, vec![ bind!{ t: expr!("A") } ]);