Re: \a^b
Ulrich Neumerkel <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
Lumj : >In 6.4.1, I get following: >?-\a^b=..L. >L=[\,a^b]. >?-\(a)^b=..L. >L=[^,\a,b]. > >As \ and ^ both have a precedence of 200, i want to know if there's > any theory in the result? Because I have a tendency to think that the > parentheses do not affect the association of terms outside them. \(a)^b is like (\(a))^b because no space before the opening bracket enforces functional notation, disabling the operators. The precedence specifier is what is of relevance here: :- op(200,xfy,^). :- op(200, fy,\). >In fact this is preventing using lambda like this: >call(\(X:Y)^p(X,Y),x,y). Why the : ? call(\X^Y^p(X,Y),x,y) does this with http://www.complang.tuwien.ac.at/ulrich/Prolog-inedit/lambda.pl