From: Alan P. <ap...@re...> - 2003-06-16 20:50:49
|
In article <Pin...@ea...>, 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? |