Howdy all,
If what I'm doing is committing any CLIPS sins, somebody please let me know -
I'm a Lisp guy :).
I've written a member function that's more specific to my needs. I call it
oneOfMember, and it takes two lists - one a 'bag' of stuff to look for, and
the second a list in which to look. The function returns the matched item.
So:
(oneOfMember (create$ A B C) (create$ (D E B Q)))
would return B.
But, after I've got a match, I need to assert a fact that contains the item
that was matched. (If more explanation is needed, I've got a sentence and a
list of dictionary terms. If one is found, I want to assert which one was
found. And I don't want to make a rule for every term.)
So, I need to do something like this:
(bind ?d (oneOfMember (create$ A B C) (create$ (D E B Q))))
(assert (match (concept DICTIONARY-TERM) (data ?d)))
Well, since I only want to fire this rule on a match, I need that oneOfMember
statement to be in front of the =>. Which means I need it in a (test...),
right?
So hence, my question - can I somehow test it and bind it at the same
time? Can I do this:
(bind ?d (oneOfMember (create$ A B C) (create$ (D E B Q))))
(test ?d)
=>
(assert (match (concept DICTIONARY-TERM) (data ?d)))
??
Thanks!
Duane
---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list. List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------