Defining Macros in Scheme
Two Styles of Macros in DrScheme
Using Lispish Macros in DrScheme
Example: NULLIFY
Macro Expansion for NULLIFY
Macro Call Evaluation
MACROEXPAND in DrScheme
Example: IF-N-Z-P
Macro Expansion: IF-N-Z-P
Example: PUSH
Macro Expansion for PUSH
Full Macro-form Evaluation
Example: TWICE
Example: AVERAGE
Example: SET-TO-ONE
Backquote and Comma Syntax
Example: ENQUEUE
Procedure NCONC
Example: SELECT
Using DEFINE-SYNTAX and SYNTAX-RULES in DrScheme
WHEN
WHEN … EXCEPT
Language Extension
Email: tanimoto@cs.washington.edu
Home Page: http://www.cs.washington.edu/people/faculty/tanimoto.html
Download presentation source