As a workaround, you can use a lambda for smuggling the list into the query:
(bind ?eq-pqr (lambda (?arg) (return (eq (list p q r) ?arg))) )
(defquery q1
(declare (variables ?pa ?lam))
(myfact (a ?pa) (b ?b) (c $?v :(?lam $?v))
)
)
-W
On Fri, Nov 13, 2009 at 7:04 PM, Ernest Friedman-Hill
Given this deffunction:
(deffunction list2lambda ($?list)
(return (eval (str-cat (lambda (?arg) (return (eq (list
(implode$ $?list)
) ?arg)))
the run-query* call could even be written as simply as
(run-query* q1 1 (list2lambda p q r
Hi,
I am wondering why XMLPrinter must load classes that are imported.
Turning clp into jessML could be done during desing time without the
need of the imported classes.
It is at runtime that the Rule engine needs the imported classes.
Any help is appreciated.
Son Nguyen
This idea -- creating some kind of JessUnit -- comes up from time to
time. I've solicited ideas, but unfortunately the conversation tends
to die down too quickly. I think just using JUnit along with some
custom fixtures -- for example, the assertRuleFired built using
JessEvents that other
That is *really* clever. Sweet!
On Nov 16, 2009, at 10:59 AM, Wolfgang Laun wrote:
Given this deffunction:
(deffunction list2lambda ($?list)
(return (eval (str-cat (lambda (?arg) (return (eq (list
(implode$ $?list)
) ?arg)))
the
I agree that this would be *possible*, but it's just not how it works
right now.
On Nov 16, 2009, at 2:11 PM, Nguyen, Son wrote:
Hi,
I am wondering why XMLPrinter must load classes that are imported.
Turning clp into jessML could be done during desing time without the
need of the