Re: goal_expansion
"Richard A. O'Keefe" <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
On 11/02/2014, at 6:07 AM, Jonathon Doran wrote: > Quoting Jan Wielemaker <[email protected]>: > >> There is little wrong with this usage, although I wonder why you are not >> using a nice meta predicate: > > The explanation is simple: I wouldn't know what a meta predicate is if > it beat me up and stole my lunch money. A meta-predicate is just a predicate that takes one or more code fragments as run-time arguments. These code fragments may be complete goals -- invoked using call/0 -- or they may be goals missing some of their rightmost arguments -- called using call/(N+1) if N arguments will be supplied. Never do with macros what you can do with ordinary procedure calls at least until you have debugged and profiled your program.