PasteRack.org
Paste # 80014
2019-03-13 16:37:51

Fork as a new paste.

Paste viewed 121 times.


Embed:

  1. #lang racket
  2.  
  3. (define-syntax (env stx)
  4.   (syntax-case stx ()
  5.     [(_ name)
  6.      #'(let-syntax ([m (λ (s) (datum->syntax s (getenv name)))])
  7.          (m))]))
  8.  
  9. (env (string-append "PA" "TH"))

=>

"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/pasterack/racket68/bin:/home/pasterack/racket68/bin"