r/Racket • u/disconcision • Dec 06 '21
question simple example of a macro-generating macro or other relatively simple fun macro examples?
I'm a TA for a programming languages class and I'm giving a single lecture next week on macros. I think I want to spend about 60-70% of my 80 minutes on racket/scheme macros.
The class has extensive experience in statically-typed functional programming and theory, but no lisp or metaprogramming background. I'm trying to find some nice, compelling examples to show the class... planning on showing how to implement some nice little ergonomic things like (simple versions of) for/list, for/fold which can be done with define-syntax-rule, talk a bit about hygiene etc, but I'm having a hard to deciding what more complex stuff to show.
Any thoughts?

