词条 | Anaphoric macro |
释义 |
An anaphoric macro is a type of programming macro that deliberately captures some form supplied to the macro which may be referred to by an anaphor (an expression referring to another). Anaphoric macros first appeared in Paul Graham's On Lisp[1] and their name is a reference to linguistic anaphora[1]—the use of words as a substitute for preceding words. ExamplesThe Here is an example that sums the value of non- Here Defining anaphoric macrosOne example is an anaphoric version of the if-then-else construct, which introduces an anaphor Another example is an anaphoric version of the λ-function, which binds the function itself to the anaphor See also
References1. ^1 Chapter 6 of Let over Lambda 2. ^22. LOOP for Black Belts from Practical Common Lisp 3. ^[https://stackoverflow.com/q/3922204/165806 What would be an example of an anaphoric conditional in Lisp?] on StackOverflow 4. ^6.1.8.1 Examples of clause grouping from the Common Lisp HyperSpec 5. ^1 Chapter 14. Anaphoric Macros {{webarchive |url=https://web.archive.org/web/20120426001111/http://dunsmor.com/lisp/onlisp/onlisp_18.html |date=April 26, 2012 }} of On Lisp by Paul Graham External links{{wikibooks|Common Lisp|External libraries/Extended Binding#Anaphoric macros with Anaphora|Anaphoric macros with Anaphora}}
4 : Lisp (programming language)|Programming constructs|Source code|Articles with example Lisp code |
随便看 |
|
开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。