Share your favourite macros that you've written!

Another one-liner to define a very simple hygienic threading macro:

(define-syntax-parse-rule (with it:id body:expr ...)
  (let* ([it body] ...) it))

Usage example:

(with it "Hello World"
      (string-downcase it)
      (string-split it)
      (map string->list it)
      (displayln it))
; displays: ((h e l l o) (w o r l d))
7 Likes