From d7e053ac066cef6456a70f5206de2b8333c3b64d Mon Sep 17 00:00:00 2001 From: logicmoo Date: Wed, 11 Sep 2024 03:25:36 -0700 Subject: [PATCH] correct intersect-elements which needs a collapse on the outside --- .../hyperon-mettalog_sanity/intersection_tests.metta | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/baseline_compat/hyperon-mettalog_sanity/intersection_tests.metta b/tests/baseline_compat/hyperon-mettalog_sanity/intersection_tests.metta index ccbc1b3fc71..9b94eb2abc3 100644 --- a/tests/baseline_compat/hyperon-mettalog_sanity/intersection_tests.metta +++ b/tests/baseline_compat/hyperon-mettalog_sanity/intersection_tests.metta @@ -215,10 +215,13 @@ Test intersection with duplicates ) -;(= (intersection-element $x $y) (intersection (superpose $x) (superpose $y))) -;!(assertEqual (intersection-element (1 2 3 foo bar) (2 foo)) (superpose (2 foo))) + ; -; (= (intersection $x $y) (superpose (intersection-element (collapse $x) (collapse $y)))) +; (= (intersection $x $y) (superpose (intersect-elements (collapse $x) (collapse $y)))) + +; A Test to show we can define a function to be used like how normal people are imagining +(= (intersect-elements $x $y) (collapse (intersection (superpose $x) (superpose $y)))) +!(assertEqual (intersect-elements (1 2 3 foo bar) (2 foo)) (2 foo)) "