lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Neil Puttock
Subject: Re: [frogs] Adding docstring support to def-grace-function
Date: Wed, 7 Jan 2009 21:17:14 +0000

2009/1/7 Carl D. Sorensen <address@hidden>:

> You can also paste the following in at the guile> prompt, which is obtained
> by typing
>
> guile
>
> in a terminal window:
>
> (define (test-opt-args arg1 arg2 . t-opt-args arg1 arg2 . rest)
>   (display "arg1 ")(display arg1)(newline)
>   (display "arg2 ")(display arg2)(newline)
>   (display "rest ")(display rest)(newline))
> (test-opt-args 1 2 3 4 5 6 7 8 9)
>
>
> This will define and execute a procedure named test-opt-args that has two
> fixed arguments and the remainder are optional.

As Carl has shown here, the optional arguments are often named `rest';
you'll find a few interesting examples in lilypond by grepping for `.
rest'.

Regards,
Neil




reply via email to

[Prev in Thread] Current Thread [Next in Thread]