kzccm1d4if10m2xaz1wqy3xar821pp1r-my-site-anaphoric-git.test.suzanne.soy-0.0.1

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

aif.rkt (331B)


      1 #lang racket/base
      2 
      3 (provide aif it)
      4 (require anaphoric/it
      5          racket/stxparam
      6          (for-syntax racket/base))
      7 
      8 (define-syntax-rule (aif condition true-branch false-branch)
      9   (let ([tmp condition])
     10     (if tmp
     11         (syntax-parameterize ([it (make-rename-transformer #'tmp)])
     12           true-branch)
     13         false-branch)))