diff --git a/python/sandbox/bhv_binding/01_example_majority.metta b/python/sandbox/bhv_binding/01_example_majority.metta index 3e000a614..1949ac883 100644 --- a/python/sandbox/bhv_binding/01_example_majority.metta +++ b/python/sandbox/bhv_binding/01_example_majority.metta @@ -4,9 +4,9 @@ !(bind! &b (bhv-new)) !(bind! &c (bhv-new)) -(= (abc) (bhv-majority &a &b &c )) +!(bind! &abc (bhv-majority &a &b &c )) -!(bhv-std-apart-relative &a (abc)) -!(bhv-is-related &a (abc)) +!(bhv-std-apart-relative &a &abc) +!(bhv-is-related &a &abc) diff --git a/python/sandbox/bhv_binding/02_example_perm.metta b/python/sandbox/bhv_binding/02_example_perm.metta index 69ac58e32..4e1a172b6 100644 --- a/python/sandbox/bhv_binding/02_example_perm.metta +++ b/python/sandbox/bhv_binding/02_example_perm.metta @@ -6,13 +6,13 @@ !(bind! &perm1 (bhv-new-perm)) (= (perm1 $x) (bhv-apply-perm &perm1 $x)) -(= (ab) (bhv-majority &a &b )) +!(bind! ab (bhv-majority &a &b )) ; Should return False since a is permuted but ab is not permuted -!(bhv-is-related (perm1 &a) (ab)) +!(bhv-is-related (perm1 &a) ab) ;Should return True -!(bhv-is-related (perm1 &a) (perm1 (ab))) +!(bhv-is-related (perm1 &a) (perm1 ab)) diff --git a/python/sandbox/bhv_binding/03_example_dict.metta b/python/sandbox/bhv_binding/03_example_dict.metta index 7a027b12f..4d9f85367 100644 --- a/python/sandbox/bhv_binding/03_example_dict.metta +++ b/python/sandbox/bhv_binding/03_example_dict.metta @@ -8,10 +8,10 @@ !(bind! &k3 (bhv-new)) -(= (dict) (bhv-majority (bhv-bind &v1 &k1) (bhv-bind &v2 &k2) (bhv-bind &v3 &k3) )) -(= (v1_retrived) (bhv-bind &k1 (dict))) +!(bind! dict (bhv-majority (bhv-bind &v1 &k1) (bhv-bind &v2 &k2) (bhv-bind &v3 &k3) )) +!(bind! v1_retrived (bhv-bind &k1 dict)) -!(bhv-std-apart-relative (v1_retrived) &v1) -!(bhv-is-related (v1_retrived) &v1) +!(bhv-std-apart-relative v1_retrived &v1) +!(bhv-is-related v1_retrived &v1) diff --git a/python/sandbox/bhv_binding/04_example_dollar_of_mexico.metta b/python/sandbox/bhv_binding/04_example_dollar_of_mexico.metta index 05a635e95..2c2474300 100644 --- a/python/sandbox/bhv_binding/04_example_dollar_of_mexico.metta +++ b/python/sandbox/bhv_binding/04_example_dollar_of_mexico.metta @@ -11,19 +11,19 @@ !(bind! &peso (bhv-new)) -(= (USA) (bhv-majority (bhv-bind &name &united_states) (bhv-bind &capital_city &washington_dc) (bhv-bind &money &dollar) )) -(= (MEX) (bhv-majority (bhv-bind &name &mexico) (bhv-bind &capital_city &mexico_city) (bhv-bind &money &peso) )) +!(bind! USA (bhv-majority (bhv-bind &name &united_states) (bhv-bind &capital_city &washington_dc) (bhv-bind &money &dollar) )) +!(bind! MEX (bhv-majority (bhv-bind &name &mexico) (bhv-bind &capital_city &mexico_city) (bhv-bind &money &peso) )) -(= (Pair) (bhv-bind (USA) (MEX))) +!(bind! Pair (bhv-bind USA MEX)) ; should return True here -!(bhv-is-related (bhv-bind (USA) &money) &dollar) +!(bhv-is-related (bhv-bind USA &money) &dollar) -(= (dollar_of_mexico) (bhv-bind &dollar (Pair))) +!(bind! dollar_of_mexico (bhv-bind &dollar Pair)) ; should return True here. "Dollar of mexico" is peso -!(bhv-is-related (dollar_of_mexico) &peso) +!(bhv-is-related dollar_of_mexico &peso)