In Daml, `foldl1` works differently from Haskell, is this intentional?
App Development5 posts400 views5 likesLast activity Jan 2022
GY
gyorgybalazsiOP
Jan 2022 1ST
Stephen
Jan 2022 2Well spotted! f x y should be f y x here.
Permit me to briefly soapbox that foldl1 and foldr1 have superior alternatives whose typechecking would have caught this—and, perhaps more importantly, made it impossible to disagree about which argument should be the “accumulator”.
ST
Stephen
Jan 2022Just to check @gyorgybalazsi you got this foldl1 from DA.Foldable rather than DA.List, right?
GY
gyorgybalazsi
Jan 2022Yes, from Foldable
ST
Stephen
Jan 2022 2I’ve opened a PR to fix this.

