回复: \a^b
"Lumj" <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
Thanks. I'm doing \(X:Y)^p(X,Y) to try a lambda call with parameter pattern matching, not to try a binary lambda call. :-) ------------------ 原始邮件 ------------------ 发件人: "Ulrich Neumerkel";<[email protected]>; 发送时间: 2013年12月12日(星期四) 凌晨1:06 收件人: "Lumj"<[email protected]>; "SWI-Prolog"<[email protected]>; 主题: Re: [SWIPL] \a^b 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 -------------- next part -------------- HTML attachment scrubbed and removed _______________________________________________ SWI-Prolog mailing list [email protected] https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog