Provide curried version of define*-public.
authorIan Price <ianprice90@googlemail.com>
Thu, 31 Jul 2014 15:05:58 +0000 (16:05 +0100)
committerIan Price <ianprice90@googlemail.com>
Thu, 31 Jul 2014 15:05:58 +0000 (16:05 +0100)
* module/ice-9/curried-definitions.scm (define*-public): New macro.

module/ice-9/curried-definitions.scm

index fa36990..7545338 100644 (file)
@@ -17,7 +17,8 @@
 (define-module (ice-9 curried-definitions)
   #:replace ((cdefine . define)
              (cdefine* . define*)
-             define-public))
+             define-public
+             define*-public))
 
 (define-syntax cdefine
   (syntax-rules ()
      (begin
        (define name val)
        (export name)))))
+
+(define-syntax define*-public
+  (syntax-rules ()
+    ((_ (head . rest) body body* ...)
+     (define*-public head
+       (lambda* rest body body* ...)))
+    ((_ name val)
+     (begin
+       (define* name val)
+       (export name)))))