KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm a beginner at Haskell, and even after reading several explanations of foldr/foldl, I can't understand why I'm getting different results below. What is the explanation? Prelude> foldl (\_ -> (+1)) 0 [1,2,3] 4 Prelude> foldr (\_ -> (+1)) 0 [1,2,3] 3 Thanks!
Tags (comma-separated)
Save Edits
Cancel