This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
guile-prescheme/prescheme/syntax-utils.scm
2022-07-21 22:31:11 +10:00

15 lines
467 B
Scheme

;;; Copyright 2022 Andrew Whatson
(define-module (prescheme syntax-utils)
#:use-module (srfi srfi-1)
#:use-module (system syntax)
#:export (syntax-conc))
(define (syntax-conc . things)
(let ((sob (find syntax? things))
(syms (map (lambda (thing)
(if (syntax? thing)
(syntax->datum thing)
thing))
things)))
(datum->syntax sob (apply symbol-append syms))))