[Haskell-cafe] Simple list processing

Chris Eidhof chris at eidhof.nl
Wed Jun 11 16:35:56 EDT 2008


Hey Andrew,

On 11 jun 2008, at 20:17, Andrew Coppin wrote:
> According to the theory, anything that consumes a list and produces  
> a value is some kind of fold. [Assuming it traverses the list in a  
> sensible order!] So it looks like you could implement this as a  
> fold. But should that be a LEFT-fold or a RIGHT-fold? (I always get  
> confused between the two!)
Check out http://foldl.com/ and http://foldr.com ;)

-chris


More information about the Haskell-Cafe mailing list