PasteRack.org
Paste # 80462
2023-01-21 16:28:40

Fork as a new paste.

Paste viewed 1128 times.


Embed:

  1. #lang racket
  2.  
  3. (define-syntax foo
  4.   (syntax-rules (x)
  5.     ((_ x) #t)
  6.     ((_ _) #f)))
  7.  
  8. (display (foo x))
  9. (newline)
  10.  
  11. (let ((x 0))
  12.   (display (foo x))
  13.   (newline))

=>

#t

#f