JESS: multiple bindings of a multislot
"Wolfgang Laun" <[email protected]> Sun, 14 Aug 2011 20:30:27 +0200
| Newsgroups | gmane.comp.java.jess |
|---|---|
| Message-ID | <CANaj1LeQ3R4aBTrDHpEtZDf9ZXXEo87AtDonEBORwSn=iNkXmQ@mail.gmail.com> |
Given (deftemplate Temp (multislot m)) Cursory tests seem to indicate that a Temp pattern may be written with just a single set of clusters consisting of '?', '$?' and their named cousins. As an example, it's possible to write (Temp (m $? one two $?)) but not (Temp (m $? one two $?)(m $?mvals)) to ascertain that "one" and "two" occur as indicated *and *to bind ?mvals to the entire list. There is, of course, the workaround to use (Temp) once more, making sure that the facts are the same, but this is rather a lot to write for a relatively simple thing. Is it correct that one (multi)slot cannot be used more than once in a single pattern (except as a variable between braces)? -W