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/

Reply via email to