[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
a happy user
From: |
Bill Schottstaedt |
Subject: |
a happy user |
Date: |
Sat, 30 Sep 2000 07:28:54 -0700 |
I just wanted to say "Thank you!" to the guile
developers for optargs and generalized set! --
I have been slowly moving a large Common Lisp
program (with antecedents in MacLisp, not to
mention Fortran, SAIL, FAIL...) into Scheme
(Guile), and its main user-interface is a CL
macro essentially defined:
(defmacro with-sound ((&key (srate 22050) ...) &body body)
(let (...) ,.body))
so that a call looks like
(with-sound (:srate 44100) (fm-violin 0 1 440 .1))
and in Guile I got it to work as:
(defmacro with-sound (args . body)
`((lambda* (#:key (srate 22050)
(explode #f))
(let ((old-srate (mus-srate)))
(dynamic-wind
(lambda ()
(set! (mus-srate) srate))
(lambda ()
,@body)
(lambda ()
(set! (mus-srate) old-srate)))))
,@args))
I'm all smiles!
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- a happy user,
Bill Schottstaedt <=