Code Comments
Programming Forum and web based access to our favorite programming groups.can someone point me to somewhere online which describes how the caret works in : v(e,1,X^go(X)) --> [went]. I found this usage here: http://courses.essex.ac.uk/lg/LG619/mt/index_0.html#32 It looks like I am getting extra "slots" without changing the "footprint" of my rule and this is what I want (I am not using the correct words I know). Unfortunately google-ing for the '^' or 'prolog caret' does not work very well. Thank you for your help, -- Marco
Post Follow-up to this messageMarco Scoffier <marco@metm.org> writes: > can someone point me to somewhere online which describes how the caret > works in : > > v(e,1,X^go(X)) --> [went]. It's an operator. It doesn't *do* anything - your grammar rule just happens to have as third parameter a compound term whose functor is '^'/2. You coul d have written either of the following with essentially the same effect: v(e, 1, X-go(X)) --> [went]. v(e, 1, foo(X, go(X))) --> [went]. IIRC, only bagof/3 and setof/3 treat '^'/2 specially - there it acts as an existential quantifier. HTH, Jens. -- mailto:jjk@acm.org As the air to a bird, or the sea to a fis h, http://www.bawue.de/~jjk/ so is contempt to the contemptible. [Blake]
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.