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

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -