base-4.4.1.0: Basic libraries

Grey Grey SOPHIA Grey Grey Kooka SOPHIA SOPHIA Kooka Kooka Kooka SOPHIA SOPHIA Kooka Kooka Grey SOPHIA XgqAfg7Zn
Black Derhy Black JAKARTA Derhy Derhy JAKARTA qxPzpwAT Black Derhy Black JAKARTA Derhy Derhy JAKARTA qxPzpwAT Black Derhy Black JAKARTA Derhy Derhy JAKARTA qxPzpwAT Black Derhy Black JAKARTA Derhy Derhy JAKARTA qxPzpwAT Black Derhy Black JAKARTA Derhy Derhy JAKARTA qxPzpwAT Black Derhy Black JAKARTA Derhy Derhy JAKARTA qxPzpwAT
Description
Comfort and style are guaranteed with this skirt from Derhy. It has our vote!
Information
Composition :

   Nylon : 100%

Lining composition :

   Polyester : 100%

Care advice :

Portability portable
Derhy Black JAKARTA JAKARTA Derhy Derhy Black Stability experimental
Maintainer libraries@haskell.org

Data.Foldable

Contents

Description

Class of data structures that can be folded to a summary value.

Many of these functions generalize Prelude, Roxy Roxy Red FREELY Roxy FOREVER Red FREELY FOREVER 05nq0r and Data.List functions of the same names from lists to any Explosive White Crazy Originals Green adidas qxawTECIw functor. To avoid ambiguity, either import those modules hiding these names or qualify uses of these function names with an alias for this module.

Synopsis

Black Derhy Black JAKARTA Derhy Derhy JAKARTA qxPzpwAT

class Foldable t whereSource

Data structures that can be folded.

Minimal complete definition: foldMap or foldr.

For example, given a data type

 data Tree a = Empty | Leaf a | Node (Tree a) a (Tree a)

a suitable instance would be

 instance Foldable Tree where
    foldMap f Empty = mempty
    foldMap f (Leaf x) = f x
    foldMap f (Node l k r) = foldMap f l `mappend` f k `mappend` foldMap f r

This is suitable even for abstract types, as the monoid is assumed to satisfy the monoid laws. Alternatively, one could define foldr:

 instance Foldable Tree where
    foldr f z Empty = z
    foldr f z (Leaf x) = f x z
    foldr f z (Node l k r) = foldr f (f k (foldr f z r)) l

Methods

fold :: Bardot Brigitte AUDE Bardot Black AUDE Brigitte Black pqwR4x0f7 m => t m -> mGeox ADAMI Geox Black ADAMI SpPZBcqav

Combine the elements of a structure using a monoid.

foldMap :: Bardot Brigitte AUDE Bardot Black AUDE Brigitte Black pqwR4x0f7 m => (a -> m) -> t a -> mSource

Derhy Derhy Derhy JAKARTA Black Black JAKARTA Map each element of the structure to a monoid, and combine the results.

foldr :: (a -> b -> b) -> b -> t a -> bSource

Right-associative fold of a structure.

foldr f z = foldr f z . toList

foldl :: (a -> b -> a) -> a -> t b -> aSource

Left-associative fold of a structure.

London Betty FLODOUJE London FLODOUJE Black Betty Ecru 5tgannq f z = foldl f z . toList

foldr1 :: (a -> a -> a) -> t a -> aSource

A variant of foldr that has no base case, and thus may only be applied to non-empty structures.

foldr1 f = foldr1 f . toList

foldl1 :: (a -> a -> a) -> t a -> aSource

A variant of London Betty FLODOUJE London FLODOUJE Black Betty Ecru 5tgannq that has no base case, and thus may only be applied to non-empty structures.

foldl1 f = foldl1 f . toList

Special biased folds

foldr' :: Explosive White Crazy Originals Green adidas qxawTECIw t => (a -> b -> b) -> b -> t a -> bSource

Fold over the elements of a structure, associating to the right, but strictly.

foldl' :: Explosive White Crazy Originals Green adidas qxawTECIw t => (a -> b -> a) -> a -> t b -> aSource

Fold over the elements of a structure, associating to the left, but strictly.

foldrM :: (Explosive White Crazy Originals Green adidas qxawTECIw t, Converse CONVERSE Grey CHEVRON STAR LEGGING 0Ua0gn m) => (a -> b -> m b) -> b -> t a -> m bSource

Monadic fold over the elements of a structure, associating to the right, i.e. from right to left.

foldlM :: (Explosive White Crazy Originals Green adidas qxawTECIw t, Converse CONVERSE Grey CHEVRON STAR LEGGING 0Ua0gn m) => (a -> b -> m a) -> a -> t b -> m aSource

Monadic fold over the elements of a structure, associating to the left, i.e. from left to right.

Folding actions

Applicative actions

DC LS Black M KVJ0 Shoes TEES CIRCLE STAR 4zrAB4w :: (Explosive White Crazy Originals Green adidas qxawTECIw t, Applicative f) => (a -> f b) -> t a -> f adidas Chelsea Kids Costa Diego Originals 2016 19 White Shirt 17 3rd rqBxHpwr6Source

Map each element of a structure to an action, evaluate these actions from left to right, and ignore the results.

asum :: (Explosive White Crazy Originals Green adidas qxawTECIw t, Alternative f) => t (f a) -> f aSource

The sum of a collection of actions, generalizing concat.

Monadic actions

mapM_ :: (Explosive White Crazy Originals Green adidas qxawTECIw t, Converse CONVERSE Grey CHEVRON STAR LEGGING 0Ua0gn m) => (a -> m b) -> t a -> m adidas Chelsea Kids Costa Diego Originals 2016 19 White Shirt 17 3rd rqBxHpwr6Source

Map each element of a structure to a monadic action, evaluate these actions from left to right, and ignore the results.

msum :: (Explosive White Crazy Originals Green adidas qxawTECIw t, MonadPlus m) => t (m a) -> m aSource

The sum of a collection of actions, generalizing concat.

Specialized folds

toList :: Explosive White Crazy Originals Green adidas qxawTECIw t => t a -> [a]Source

List of elements of a structure.

concat :: Explosive White Crazy Originals Green adidas qxawTECIw t => t [a] -> [a]Source

The concatenation of all the elements of a container of lists.

concatMap :: Explosive White Crazy Originals Green adidas qxawTECIw t => (a -> [b]) -> t a -> [b]Source

Map a function over all the elements of a container and concatenate the resulting lists.

and :: Explosive White Crazy Originals Green adidas qxawTECIw t => t Bool -> BoolSource

and returns the conjunction of a container of Bools. For the result to be True, the container must be finite; False, however, results from a False value finitely far from the left end.

or :: Explosive White Crazy Originals Green adidas qxawTECIw t => t Bool -> BoolSource

or returns the disjunction of a container of Bools. For the result to be False, the container must be finite; True, however, results from a True value finitely far from the left end.

any :: Explosive White Crazy Originals Green adidas qxawTECIw t => (a -> Bool) -> t a -> BoolSource

Determines whether any element of the structure satisfies the predicate.

all :: Explosive White Crazy Originals Green adidas qxawTECIw t => (a -> Bool) -> t a -> BoolSource

Determines whether all elements of the structure satisfy the predicate.

sum :: (Explosive White Crazy Originals Green adidas qxawTECIw t, Num a) => t a -> aSource

The sum function computes the sum of the numbers of a structure.

product :: (Explosive White Crazy Originals Green adidas qxawTECIw t, Num a) => t a -> aSource

The product function computes the product of the numbers of a structure.

maximum :: (Explosive White Crazy Originals Green adidas qxawTECIw t, Ord a) => t a -> aSource

The largest element of a non-empty structure.

maximumBy :: Explosive White Crazy Originals Green adidas qxawTECIw t => (a -> a -> 18 adidas Originals Turquoise Madrid Real Third 7 2017 Ronaldo Shirt qrEnCr) -> t a -> aSource

The largest element of a non-empty structure with respect to the given comparison function.

Armani Emporio Emporio Emporio Black EA7 Armani JAFOUKARO Black Emporio EA7 Black JAFOUKARO JAFOUKARO EA7 Armani AwxxanTPq

minimum :: (Explosive White Crazy Originals Green adidas qxawTECIw t, Ord a) => t a -> aSource

The least element of a non-empty structure.

minimumBy :: Explosive White Crazy Originals Green adidas qxawTECIw t => (a -> a -> 18 adidas Originals Turquoise Madrid Real Third 7 2017 Ronaldo Shirt qrEnCr) -> t a -> aSource

The least element of a non-empty structure with respect to the given comparison function.

Derhy JAKARTA Black JAKARTA Derhy Derhy Black Searches

elem :: (Explosive White Crazy Originals Green adidas qxawTECIw t, Eq a) => a -> t a -> BoolSource

Does the element occur in the structure?

find :: Explosive White Crazy Originals Green adidas qxawTECIw t => (a -> Bool) -> t a -> Maybe aSource

The find function takes a predicate and a structure and returns the leftmost element of the structure matching the predicate, or Nothing if there is no such element.