summaryrefslogtreecommitdiff
path: root/ice-9/keywords.scm
diff options
context:
space:
mode:
Diffstat (limited to 'ice-9/keywords.scm')
-rw-r--r--ice-9/keywords.scm15
1 files changed, 15 insertions, 0 deletions
diff --git a/ice-9/keywords.scm b/ice-9/keywords.scm
new file mode 100644
index 000000000..da45f046a
--- /dev/null
+++ b/ice-9/keywords.scm
@@ -0,0 +1,15 @@
+
+;;; {Keywords}
+;;;
+
+(define (symbol->keyword symbol)
+ (make-keyword-from-dash-symbol (symbol-append '- symbol)))
+
+(define (keyword->symbol kw)
+ (let ((sym (keyword-dash-symbol kw)))
+ (string->symbol (substring sym 1 (string-length sym)))))
+
+(define (kw-arg-ref args kw)
+ (let ((rem (member kw args)))
+ (and rem (pair? (cdr rem)) (cadr rem))))
+