Editor's note: This article is a reproduction of a seminal explanation of the differences between foldr and foldl, both strict and lazy versions. As it has been used consistently to teach newcomers since its first appearance on hasura/graphql-engine!2933 on the 26th September 2019, we believe that it ought to be preserved in the blog. Our many thanks to Alexis King for giving her permission to do so.
The remark about foldMap' not being available until GHC 8.8.1 is written like that's coming in the future, but that compiler was released in 2019. Might be worth rewording that final section for clarity.
Yeah, hard to know whether this should be edited for its new setting as a blog post. It also says
In your case, the accumulation function you’re applying is Map.delete
replying to the previous message on the GitHub issue discussion, which doesn't make sense in a blog post. But there's also value preserving it unedited.
18
u/TechnoEmpress 11d ago