syntax-utils.scm 467 B

12345678910111213141516
  1. ;;; Copyright 2022 Andrew Whatson
  2. (define-module (prescheme syntax-utils)
  3. #:use-module (srfi srfi-1)
  4. #:use-module (system syntax)
  5. #:export (syntax-conc))
  6. (define (syntax-conc . things)
  7. (let ((sob (find syntax? things))
  8. (syms (map (lambda (thing)
  9. (if (syntax? thing)
  10. (syntax->datum thing)
  11. thing))
  12. things)))
  13. (datum->syntax sob (apply symbol-append syms))))