Skip to content

Commit 347a007

Browse files
authored
Merge pull request #21 from purescript/fix-foldable1-identity
Fix Foldable1 Identity instance
2 parents 94fcde4 + 9516a6c commit 347a007

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Data/Identity.purs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ instance foldableIdentity :: Foldable Identity where
8989
instance foldable1Identity :: Foldable1 Identity where
9090
fold1 (Identity x) = x
9191
foldMap1 f (Identity x) = f x
92+
foldl1 _ (Identity x) = x
93+
foldr1 _ (Identity x) = x
9294

9395
instance foldableWithIndexIdentity :: FoldableWithIndex Unit Identity where
9496
foldrWithIndex f z (Identity x) = f unit x z

0 commit comments

Comments
 (0)