Hacker News new | ask | show | jobs
by fedvasu 4628 days ago
>> fold () x it should be fold () 1 x or foldr1 () x or foldl1 () x of course according to Guy Steele, fodl and foldr are considered harmful :)
2 comments

It's really cons lists that are harmful -- foldl and foldr are just ways to operate on them. GP's example would work fine with conc trees and a divide-and-conquer reduce instead.
I don't really understand, can you explain more? I should have written in my comment that I'm a Haskell beginner...