[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: let-keywords?
From: |
Kevin Ryde |
Subject: |
Re: let-keywords? |
Date: |
Tue, 12 Dec 2006 10:35:17 +1100 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) |
Han-Wen Nienhuys <address@hidden> writes:
>
> I think that ice-9's let-keyword* macro is the thing that I've been
> looking for, but I haven't been able to work out how to use it.
I think it goes like
(let-keywords '(#:foo "hello" #:xyzzy "world") #t
((foo "default for foo")
(bar "default for bar"))
foo => "hello"
bar => "default for bar"
"allow-other-keywords" is whether it's an error to have something
unknown like #:xyzzy in the args.
I think the "let-keywords*" variant allows the default for one
variable to use the value of a previous one.
(let-keywords* '(#:foo 1 #:xyzzy 2) #t
((foo 1)
(bar (+ foo 2)))
foo => 1
bar => 3
Would those help for the manual, or can anyone think of more typical
or clearer samples?
- let-keywords?, Han-Wen Nienhuys, 2006/12/11
- Re: let-keywords?,
Kevin Ryde <=