lilypond-user
[Top][All Lists]
Advanced

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

Re: Optional arguments for scheme functions


From: David Kastrup
Subject: Re: Optional arguments for scheme functions
Date: Sun, 26 Apr 2020 19:01:07 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

"Fr. Samuel Springuel" <address@hidden> writes:

>> On 26 Apr, 2020, at 4:30 AM, Thomas Morley <address@hidden> wrote:
>> 
>> I've no clue why positive? fails here.
>> Though, for integers >= 0 we have the index? predicate, which works in
>> your function.
>
> Well, I’m glad I’m not the only one baffled.  And the index? predicate does 
> seem to work.
>
>
>
>> On 26 Apr, 2020, at 4:41 AM, Lukas-Fabian Moser <address@hidden> wrote:
>> 
>> Well, positive? does not seem to like being called with anything else than a 
>> number:
>> 
>> (positive? "I'm a string")
>> 
>> fails as well.
>> 
>> I'm not sure as to why that is the case; but anyway, this shows that
>> the problem does not come from LilyPond.
>
> Then is this something that should be reported up the chain somewhere?

Predicates used in argument parsing have to be "primary" in that they
have to deliver a result for anything thrown at them.

positive? only delivers results for numbers but throws an error for
anything else.

-- 
David Kastrup



reply via email to

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