On 03/27/2014 03:45 PM, monarch_dodra wrote:

Right, but what about "fold" vs "fold_left"? Is there a difference?

'fold' is not descriptive enough. Ranges/lists have a very particular structure allowing 'foldl' to make sense. In general recursive data types (eg. think binary tree) allow only one fold (the recursive one). The instantiation for lists is 'foldr'.

I'd rather have this named 'foldl'. 'fold' is a more abstract name 'foldr' rather than 'foldl'.

Reply via email to