unique - Removing identical facts in CLIPS -
how remove identical facts in clips?
presuming have
(fact 2) (fact 3) (fact 2) (fact 4)
i want remain (fact 2), (fact 3) , (fact 4). how can that?
well did this
(defrule removeduplicates ?f1 <- (fact ?number1) ?f2 <- (fact ?number2) (test (eq ?number1 ?number2)) => (retract ?f1) )
Comments
Post a Comment