diff options
-rw-r--r-- | ccwl/utils.scm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ccwl/utils.scm b/ccwl/utils.scm index c75ec91..6ad1ffa 100644 --- a/ccwl/utils.scm +++ b/ccwl/utils.scm @@ -83,6 +83,17 @@ or #f if there is no such entry." ((_ value . _) value) (#f #f))) +(define (unsyntax-keywords lst) + "Unsyntax keywords in LST, a list of syntax objects. For example: + +(unsyntax-keywords (list #'#:ham #'1 #'#:eggs #'2)) +=> (#:ham #'1 #:eggs 2)" + (map (lambda (element) + (if (keyword? (syntax->datum element)) + (syntax->datum element) + element)) + lst)) + ;; TODO: Implement a define** for lambda** in the spirit of define* ;; for lambda*. (define-syntax lambda** |