PasteRack.org
Paste # 21770
2019-01-03 06:25:29

Fork as a new paste.

Paste viewed 208 times.


Embed:

  1. #lang racket
  2. (require racket/list)
  3.  
  4. (define (apply/unstx proc . args)
  5.   (let ([lst (last args)]
  6.         [rst (reverse (rest (reverse args)))])
  7.     (apply proc
  8.            (for/list
  9.                ([arg (append rst lst)])
  10.                 (if (syntax? arg)
  11.                     (syntax->datum arg)
  12.                     arg)))))

=>