mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
Provide curried version of define*-public.
* module/ice-9/curried-definitions.scm (define*-public): New macro.
This commit is contained in:
parent
8857e271d8
commit
b072b8e692
1 changed files with 12 additions and 1 deletions
|
@ -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 ()
|
||||
|
@ -44,3 +45,13 @@
|
|||
(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)))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue