Defining Macros in Lisp
Example: NULLIFY
Macro Expansion for NULLIFY
Macro Call Evaluation
Example: IF-N-Z-P
Macro Expansion: IF-N-Z-P
Example: PUSH (actually built-in)
Macro Expansion for PUSH
Full Macro-form Evaluation
Example: TWICE
Example: AVERAGE
Example: SET-TO-ONE
Backquote and Comma Syntax
Example: ENQUEUE
Example: SELECT
A Better Version of IF-N-Z-P
Testing the New IF-N-Z-P
What if we didn’t use GENSYM?
Simpler Version with the Same Problem
Language Extension
Remarks
Email: tanimoto@cs.washington.edu
Home Page: http://www.cs.washington.edu/people/faculty/tanimoto.html
Download presentation source