chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] two procedures looking for a good home


From: Graham Fawcett
Subject: Re: [Chicken-users] two procedures looking for a good home
Date: Sun, 24 Feb 2008 13:46:53 -0500

On Sun, Feb 24, 2008 at 1:16 PM, Alejandro Forero Cuervo
<address@hidden> wrote:
> > If redundancy were a reason for deleting egg functionality, we have
>  > about seven object systems to get rid of. ;-)
>
>  Ah, but if you pick any two of those, they will have their
>  differences!
>
>  In this case, however, *absolutely* all usages of the new code are
>  supported by the old one and it is *impossible* for a user to find any
>  difference between them (other than the fact that orders' function is
>  called cmp-key and the combinator's make-</key) no matter how hard
>  they try.

No worries, I was just joking. :-) I agree, the redundancy is
pointless. It's pointless, I say.

I'd like to add a (sort/decorated lst cmp key) proc to your orders
egg, that calculates the key values only once; this can be more
efficient than (sort ... (cmp-key ...)) for cases where key generation
is expensive. I think it fits in your egg; are you OK with that?

(The name 'decorated' is an allusion to the 'decorate-sort-undecorate'
idiom in Python, which this replicates; we can rename to something
more clear.)

Graham




reply via email to

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