Hi to all,

I have a bug in my code that eludes me.  I have defined paths and a list to 
hold them:

(deftemplate path
  (slot name)
  (slot cost))

(deftemplate path-list
  (multislot list))

Then I tried to set a rule that would add any paths (actually their fact#) to 
the list if they were not there already:

(defrule add-path-to-list
  ?path <- (path)
  ?pathlist <- (path-list(list $?list))
  (not(member$ ?path $?list))
  =>
  (modify ?pathlist (list (create$ $?list ?path))))

This adds paths to the list, but will continue to add them even though they 
are in the list.  Any Assistance would be greatly appreciated.

Matt J

---------------------------------------------------------------------
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]
---------------------------------------------------------------------

Reply via email to