ConcurrentUtils-0.3.0.0: Concurrent utilities

Safe HaskellNone
LanguageHaskell98

Control.CUtils.AList

Description

Lists suitable for parallel execution (taken from Hackage's monad-par package). (For converting to regular lists, there is the toList function in Data.Foldable.)

Synopsis

Documentation

data AList t Source

Constructors

Append (AList t) (AList t) 
List [t] 

filterAList :: (b -> Bool) -> AList b -> AList b Source

Filters the AList using a predicate.

assocFold :: (c -> c -> c) -> AList c -> c Source

Folds the AList with a function, that must be associative. This allows parallelism to be introduced.

monoid :: (Monoid a, Eq a) => AList a -> a Source

Combine monoid elements to get a result.

lenAList :: (Num a, Eq a1) => AList a1 -> a Source

Length of an AList.

findAList :: Eq a => (a -> Bool) -> AList a -> Maybe a Source

Find the first element satisfying a predicate.

concatAList :: Monad m => m (m b) -> m b Source

Concatenate an AList of ALists.