Skip to content

Commit 0fa2889

Browse files
author
Martin Bidlingmaier
committed
Fix foldMapDefaultL
Previously, ```purescript foldMapDefaultL singleton [1, 2] = [2, 1] ``` This commit fixes this: ```purescript foldMapDefaultL singleton [1, 2] = foldMapDefaultR singleton [1, 2] = [1, 2] ```
1 parent 363af1e commit 0fa2889

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Data/Foldable.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ foldMapDefaultL
115115
=> (a -> m)
116116
-> f a
117117
-> m
118-
foldMapDefaultL f = foldl (\acc x -> f x <> acc) mempty
118+
foldMapDefaultL f = foldl (\acc x -> acc <> f x) mempty
119119

120120
instance foldableArray :: Foldable Array where
121121
foldr = foldrArray

0 commit comments

Comments
 (0)