[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [frogs] Adding docstring support to def-grace-function
From: |
Patrick McCarty |
Subject: |
Re: [frogs] Adding docstring support to def-grace-function |
Date: |
Thu, 8 Jan 2009 12:11:30 -0800 |
On Wed, Jan 7, 2009 at 12:58 PM, Carl D. Sorensen <address@hidden> wrote:
>
> On 1/7/09 12:03 PM, "Patrick McCarty" <address@hidden> wrote:
>>
>>> A syntax that would not require a convert-ly rule would be
>>>
>>> acciaccatura =
>>> #(def-grace-function startAcciaccaturaMusic stopAcciaccaturaMusic
>>> (_i "Here is the docstring."))
>>>
>>> because the docstring argument can be written as an optional argument
>>> in the macro definition for def-grace-function. So adding a docstring
>>> is a syntax addition, not a change, and no convert-ly rule is needed.
>>
>> I see a few Scheme procedures that use the #:optional keyword. This
>> is what you are referring to, right?
>
> It's not what I was referring to, but it may have been what I should have
> been referring to.
>
> What I was referring to is something that Nicolas used in his redefinition
> of define-music-function. You can define a procedure
>
> (define (my-proc arg1 arg2 . optional-arguments) (...))
>
> and call it with
>
> (my-proc 1 2 3 4 5 6 7 8)
Okay, thanks Carl. I think it will be easier to use this construct.
I will take a look at it soon.
-Patrick