[Top][All Lists]

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

Re: [PATCH] functional-or returned #f for (functional-or #f #t #f). Fixe

From: David Kastrup
Subject: Re: [PATCH] functional-or returned #f for (functional-or #f #t #f). Fixed.
Date: Mon, 23 Nov 2009 07:18:46 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

Patrick McCarty <address@hidden> writes:

> On Tue, Nov 17, 2009 at 11:24 PM, David Kastrup <address@hidden> wrote:
>> Patrick McCarty <address@hidden> writes:
>>> On 2009-11-16, David Kastrup wrote:
>>>> It still suffers from not doing short-circuit evaluation.  For
>>>> readability and efficiency, I'd really prefer replacing
>>>> '(apply functional-or' with '(any'
>>> It looks like Neil removed the "is-harmonic" binding from this
>>> procedure a couple of days ago, since it was unused.
>>> So, nothing really needs to be changed after all.  :-)
>> Still I feel more comfortable with this patch in place.  I am not
>> entirely sure whether it would not be simpler to just scratch both
>> functional-or and functional-and altogether since they are basically
>> only useful in situations where one would better use a different mapping
>> function with short-circuit evaluation.
> Oh, I didn't realize you wanted to change the `functional-or' itself.
> I don't think we should remove the two procedures entirely, because
> users might have written Scheme extension code that uses them.

They couldn't.  Wrong namespace.

lilypond -e '(functional-or 1)'
GNU LilyPond 2.13.8
<unnamed port>:1:8: In expression (functional-or 1):
<unnamed port>:1:8: Unbound variable: functional-or

> Can you send a formal patch so I can see how you want these procedures
> implemented?

I really don't want to have them implemented at all since you are better
off using a different mapping function that uses short-circuit
evaluation rather than mapping over functional-or.

David Kastrup

reply via email to

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