Thanks for the prompt reply. However, the answer 
works only if the number of facts to be combined
is known. The problem I am facing is that the 
facts are all in the form of (a ...), but I don't
know how many in advance. I just need to combine 
them all.

Thanks again for the help.

Sam Yang

At 07:15 15/04/99 -0700, you wrote:
>(defrule combine-facts
>       (a ?X)
>       (a ?Y&~?X)
>       (a ?Z&~Y&~X)
>       =>
>       (assert (A ?X ?Y ?Z)))
>
>Something like that?
>
>
>I think S Yang wrote:
>> 
>> Dear All,
>> 
>> I am trying to write some JESS programs. It is easy to 
>> start but to write something useful, it is much more 
>> difficult than other languages. One of the problwm I 
>> often face can be simplified as the following:
>> 
>> Given a list of facts:
>>  (a 1)
>>  (a 2)
>>  (a 3)
>> ...
>> 
>> How do you construct a fact?
>>  (A 1 2 3 ...)
>> 
>> Thanks in advance.
>> 
>> Sam Yang
>> 
>> 
>> ---------------------------------------------------------------------
>> 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]
>> ---------------------------------------------------------------------
>> 
>> 
>
>
>---------------------------------------------------------
>Ernest Friedman-Hill  
>Distributed Systems Research        Phone: (925) 294-2154
>Sandia National Labs                FAX:   (925) 294-2234
>Org. 8920, MS 9214                  [EMAIL PROTECTED]
>PO Box 969                  http://herzberg.ca.sandia.gov
>Livermore, CA 94550
>
>---------------------------------------------------------------------
>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]
>---------------------------------------------------------------------
> 

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

Reply via email to