Re: [frogs] Adding docstring support to def-grace-function

[ Thread Index | Date Index | More lilynet.net/frogs Archives ]


On Wed, Jan 7, 2009 at 12:58 PM, Carl D. Sorensen <c_sorensen@xxxxxxx> wrote:
>
> On 1/7/09 12:03 PM, "Patrick McCarty" <pnorcks@xxxxxxxxx> 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

---

----
Join the Frogs!


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/