Community
Modules 26

Data.Semigroup.Foldable.Class

provisional

This module re-exports a limited subset of the class methods in the , Foldable1 and Bifoldable1 classes, which are now located in the , Data.Foldable1 and Data.Bifoldable1 modules in base-4.18. , (On older versions of base, these can be found in the , foldable1-classes-compat library.) , Import from these modules instead. ] #-}

class (Foldable t) => Foldable1 (t :: Type -> Type)

Non-empty data structures that can be folded.

Instances define at least one of foldMap1 or foldrMap1.

fold1 :: (Semigroup m) => t m -> m

Given a structure with elements whose type is a Semigroup, combine them via the semigroup's (<>) operator.

foldMap1 :: (Semigroup m) => (a -> m) -> t a -> m

Map each element of the structure to a semigroup, and combine the results.

toNonEmpty :: t a -> NonEmpty a

List of elements of a structure, from left to right.

class (Bifoldable t) => Bifoldable1 (t :: Type -> Type -> Type)

bifold1 :: (Semigroup m) => t m m -> m

bifoldMap1 :: (Semigroup m) => (a -> m) -> (b -> m) -> t a b -> m

Maintainer
Edward Kmett <ekmett@gmail.com>
Portability
portable
Copyright
(C) 2011-2015 Edward Kmett
License
BSD-style (see the file LICENSE)
Build record and source files

Community contribution. The service has not verified this documentation.

Target: Linux on x86-64. Some inferred types and resolved links are not available.

Generator: aihc-haddock-858b1951-web-1

Metadata snapshot: 4ac4693dc44e2bb370a93502d1bf29784374032a00ad7b3d02803e3d433c0b16

Open the dependency plan · Download the documentation model

Import a package

Enter a package name and an exact version from Hackage. The site contains imported versions only.