I think that Mitch Christensen wrote:
>>Does anyone know of an simple/efficient way to find facts with distinct
>>slot values?
Hi Mitch,
Perhaps this is a candidate for the new "accumulate" function!?
(defrule count-assignment-children
?c <- (accumulate (bind ?count 0)
(bind ?count (+ ?count 1))
?count
(assignment (key ?key&:(eq ?key "child"))))
=>
(if (= ?count 1) then
(printout t "there is only one assignment with key=child" crlf))
;; Do something cool with ?c
)
Cheers,
Jason
------------------------------------------
Jason Morris
Assistant Moderator - Jess Listserver
www.morristechnicalsolutions.com
[EMAIL PROTECTED]
phone/fax: 503.692.1088
--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------