In article <[EMAIL PROTECTED]>, Graham Barr <[EMAIL PROTECTED]> writes: >> Note that Miranda actually calls reduce fold though - well >> actually foldl or foldr depending on which end of the list >> you start at. > > Many other have brought up this. But I ask the question "do we need two > operators" > > foldr can be done with reduce reverse @list Indeed. That was more of an aside based on the fact that I had my copy of Bird and Wadler open at the time to refresh my long suppressed memories of Miranda and noticed that it had both forms than a serious suggestion. > where reverse could be inteligent and create an iterator which itterates > over the list backwards. But on the other hand having foldl and foldr > may be being consistent with other languages. I will leave that to > Larry to decide. None of my Miranda comments were particularly concrete suggestions they were more just a question of throwing more data on what other languages do onto the pile so we can choose the best bits to steal ;-) Tom -- Tom Hughes ([EMAIL PROTECTED]) http://www.compton.nu/
- Re: Expanding the language primitives (w... Johan Vromans
- Re: Expanding the language primitives (w... Dan Sugalski
- Re: Reduce [was: Re: Random items (old p5p i... Tom Christiansen
- Re: Reduce [was: Re: Random items (old p... Graham Barr
- Re: Reduce [was: Re: Random items (old p... Hildo Biersma
- Re: Reduce [was: Re: Random items (old p5p i... Simon Cozens
- Re: Reduce [was: Re: Random items (old p5p issue... Glenn Linderman
- Re: Reduce [was: Re: Random items (old p5p issues)] Tom Hughes
- Re: Reduce [was: Re: Random items (old p5p issue... Graham Barr
- Re: Reduce [was: Re: Random items (old p5p i... John Porter
- List operations (interleave etc) -- RFRFC Tom Hughes
- List operations (interleave etc) -- RFRFC skud
- Re: Reduce [was: Re: Random items (old p5p issues)] Martyn J. Pearce
- Re: Reduce [was: Re: Random items (old p5p issues)] Graham Barr
- Re: Reduce [was: Re: Random items (old p5p issue... Jeremy Howard
- Re: Contexts [was:Reduce[Re:]] raptor
- Re: Contexts [was:Reduce[Re:]] Piers Cawley
- Re: Reduce [was: Re: Random items (old p5p issues)] Jeremy Howard
- Re: Reduce [was: Re: Random items (old p5p issue... Martyn Pearce
- Re: Reduce [was: Re: Random items (old p5p i... Jeremy Howard