logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: Idea with ExtList.fold_right: msg#00067

Subject: Re: Idea with ExtList.fold_right
In article <Pine.LNX.4.33.0306161516280.2062-100000@xxxxxxxxxxxxxxx>, Brian 
Hurt wrote:
> 
> With fold_right, it's impossible - so the question becomes which version
> do people want- slow and broken for long lists, or glacial and correct for
> all lists?  Or some tricky version which picks between them?  I've come to 
> dislike my tricky version for reasons quite apart from performance.

Why not simply provide "fold" which does a fold_left, and put in a
comment that the user should reverse the list arg if she really wants
a fold_right?  As you said, it isn't possible to walk a list
backwards, so why pretend?




-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php



Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>