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

awhen.rkt (289B)


      1 #lang racket/base
      2 
      3 (provide awhen it)
      4 (require anaphoric/it
      5          racket/stxparam
      6          (for-syntax racket/base))
      7 
      8 (define-syntax-rule (awhen condition . body)
      9   (let ([tmp condition])
     10     (when tmp
     11       (syntax-parameterize ([it (make-rename-transformer #'tmp)])
     12         . body))))