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

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


2009/1/7 Carl D. Sorensen <c_sorensen@xxxxxxx>:

> 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

---

----
Join the Frogs!


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