[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Variable argument type to music function
From: |
Carl D. Sorensen |
Subject: |
Variable argument type to music function |
Date: |
Thu, 11 Dec 2008 20:04:32 -0700 |
I'm trying to allow predefine fret diagrams to use the verbose style as well
as the terse style.
I'd like to pass a diagram-definition to a music function that can be either
a list or a string. If it's a list, I'll treat the definition as a verbose
definition. If it's a string, I'll treat it as a terse definition. I've
got everything in place except for the data type check.
What kind of a type check can I use to see if a variable is a list (or pair)
or a string?
I'm after something like:
(define-music-function (parser location key-symbol tuning shape-definition)
(symbol? pair? ????)
Where ??? would be the true for either a pair or a string.
Thanks,
Carl
- Variable argument type to music function,
Carl D. Sorensen <=