Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions src/Data/List/Types.purs
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,7 @@ derive newtype instance foldableNonEmptyList :: Foldable NonEmptyList

derive newtype instance traversableNonEmptyList :: Traversable NonEmptyList

instance foldable1NonEmptyList :: Foldable1 NonEmptyList where
fold1 (NonEmptyList (a :| as)) =
foldl append a as
foldMap1 f (NonEmptyList (a :| as)) =
foldl (\acc -> append acc <<< f) (f a) as
derive newtype instance foldable1NonEmptyList :: Foldable1 NonEmptyList

instance traversable1NonEmptyList :: Traversable1 NonEmptyList where
traverse1 f (NonEmptyList (a :| as)) =
Expand Down