Search results

sequence :: forall a m t. Traversable t => Applicative m => t (m a) -> m (t a)
P purescript-foldable-traversable M Data.Traversable
sequence1 :: forall b f t. Traversable1 t => Apply f => t (f b) -> f (t b)
P purescript-foldable-traversable M Data.Semigroup.Traversable
sequence1Default :: forall t a m. Traversable1 t => Apply m => t (m a) -> m (t a)

A default implementation of sequence1 using traverse1.

P purescript-foldable-traversable M Data.Semigroup.Traversable
sequenceDefault :: forall t a m. Traversable t => Applicative m => t (m a) -> m (t a)

A default implementation of sequence using traverse.

P purescript-foldable-traversable M Data.Traversable
distribute :: forall a g f. Distributive f => Functor g => g (f a) -> f (g a)
P purescript-distributive M Data.Distributive
distributeDefault :: forall a f g. Distributive f => Functor g => g (f a) -> f (g a)

A default implementation of distribute, based on collect.

P purescript-distributive M Data.Distributive
parSequence :: forall a t m f. Parallel f m => Traversable t => t (m a) -> m (t a)
P purescript-parallel M Control.Parallel
sequence :: forall a b c. HasApply b => HasMap b => HasTraverse a => HasPure b => a (b c) -> b (a c)

Sequences actions and collects the results.

sequence [Just 1, Just 2] -- Just [1, 2]
P purescript-neon M Neon.Helper
oneOf :: forall f g a. Foldable f => Plus g => f (g a) -> g a

Combines a collection of elements using the Alt operation.

P purescript-foldable-traversable M Data.Foldable
oneOf :: forall m f a. MonadGen m => Foldable1 f => f (m a) -> m a

Creates a generator that outputs a value chosen from a selection of existing generators with uniform probability.

P purescript-gen M Control.Monad.Gen
parOneOf :: forall a t m f. Parallel f m => Alternative f => Foldable t => Functor t => t (m a) -> m a

Race a collection in parallel.

P purescript-parallel M Control.Parallel
unwrapCofree :: forall a w f. ComonadCofree f w => w a -> f (w a)
P purescript-free M Control.Comonad.Cofree.Class
wrapFree :: forall a m f. MonadFree f m => f (m a) -> m a
P purescript-free M Control.Monad.Free.Class
choice :: forall f m a. Plus m => Foldable f => f (m a) -> m a

Choose the first successful element from a foldable container of parsers.

P purescript-simple-parser M Text.Parsing.Combinators
oneOf :: forall f m a. Foldable f => Alternative m => f (m a) -> m a
P purescript-parsers M Text.Parsing.Combinators
restoreM :: forall a stM m base. MonadBaseControl base m stM => base (stM a) -> m a
P purescript-monad-control M Control.Monad.Trans.Control
join :: forall a m. Bind m => m (m a) -> m a

Collapse two applications of a monadic type constructor into one.

P purescript-prelude M Control.Bind
duplicate :: forall a w. Extend w => w a -> w (w a)

Duplicate a comonadic context.

duplicate is dual to Control.Bind.join.

P purescript-control M Control.Extend
keepLatest :: forall a event. IsEvent event => event (event a) -> event a
P purescript-event M FRP.Event.Class
flatten :: forall a b. HasChain a => a (a b) -> a b

Removes a level of nesting from a container.

flatten [[1, 2], [3, 4]] -- [1, 2, 3, 4]
P purescript-neon M Neon.Helper
warbler :: forall a m. Bind m => m (m a) -> m a

W combinator - warbler - omega

MM

Λ a b . (a → a → b) → a → b

λ f x . f x x

P purescript-birds M Aviary.Birds
unfoldable :: forall m f a. MonadRec m => MonadGen m => Unfoldable f => m a -> m (f a)

Creates a generator that produces unfoldable structures based on an existing generator for the elements.

The size of the unfoldable will be determined by the current size state for the generator. To generate an unfoldable structure of a particular size, use the resize function from the MonadGen class first.

P purescript-gen M Control.Monad.Gen
fork :: forall a m f. MonadFork f m => m a -> m (f a)
P purescript-fork M Control.Monad.Fork.Class
suspend :: forall a m f. MonadFork f m => m a -> m (f a)
P purescript-fork M Control.Monad.Fork.Class
integrateM :: forall base m stM a. Applicative base => MonadBaseControl base m stM => m (stM a) -> m a

Pack a state belonging to m back into it, instead of throwing it away

P purescript-monad-control M Control.Monad.Trans.Control
elements :: forall m f a. MonadGen m => Foldable1 f => f a -> m a

Creates a generator that outputs a value chosen from a selection with uniform probability.

P purescript-gen M Control.Monad.Gen
inj :: forall a g f. Inject f g => f a -> g a
P purescript-functors M Data.Functor.Coproduct.Inject
join :: forall a m f. MonadFork f m => f a -> m a
P purescript-fork M Control.Monad.Fork.Class
liftBase :: forall a m b. MonadBase b m => b a -> m a
P purescript-monad-control M Control.Monad.Base
inj :: forall a g f. Inject f g => f a -> g a
P purescript-inject M Data.Inject
forever :: forall m a b. MonadRec m => m a -> m b

forever runs an action indefinitely, using the MonadRec instance to ensure constant stack usage.

For example:

main = forever $ trace "Hello, World!"
P purescript-tailrec M Control.Monad.Rec.Class
coerce :: forall f a b. Contravariant f => Functor f => f a -> f b
P purescript-contravariant M Data.Functor.Contravariant
uninterruptible :: forall a m f e. MonadBracket e f m => m a -> m a
P purescript-fork M Control.Monad.Fork.Class
cleared :: forall f a b. Filterable f => f a -> f b

Filter out all values.

P purescript-filterable M Data.Filterable
folded :: forall event a. IsEvent event => Monoid a => event a -> event a

Combine subsequent events using a Monoid.

P purescript-event M FRP.Event.Class
sort :: forall f a. Functor f => Foldable f => Unfoldable f => Ord a => f a -> f a

Sort any structure (which has Foldable, Unfoldable, and Functor instances) by converting to an OrdSeq and back again. I am fairly sure this is usually O(n*log(n)), although of course this depends on the Unfoldable and Foldable instances.

P purescript-sequences M Data.Sequence.Ordered
lookAhead :: forall a m. LookAheadParsing m => m a -> m a
P purescript-parsers M Text.Parsing.Classes
try :: forall a m. Parsing m => m a -> m a
P purescript-parsers M Text.Parsing.Classes
pure :: forall a f. Applicative f => a -> f a
P purescript-prelude M Control.Applicative
extract :: forall a w. Comonad w => w a -> a
P purescript-control M Control.Comonad
and :: forall a f. Foldable f => HeytingAlgebra a => f a -> a

The conjunction of all the values in a data structure. When specialized to Boolean, this function will test whether all of the values in a data structure are true.

P purescript-foldable-traversable M Data.Foldable
fold :: forall f m. Foldable f => Monoid m => f m -> m

Fold a data structure, accumulating values in some Monoid.

P purescript-foldable-traversable M Data.Foldable
fold1 :: forall m t. Foldable1 t => Semigroup m => t m -> m
P purescript-foldable-traversable M Data.Semigroup.Foldable
fold1Default :: forall t m. Foldable1 t => Semigroup m => t m -> m

A default implementation of fold1 using foldMap1.

P purescript-foldable-traversable M Data.Semigroup.Foldable
length :: forall a b f. Foldable f => Semiring b => f a -> b

Returns the size/length of a finite structure. Optimized for structures that are similar to cons-lists, because there is no general way to do better.

P purescript-foldable-traversable M Data.Foldable
maximum :: forall f a. Ord a => Foldable1 f => f a -> a
P purescript-foldable-traversable M Data.Semigroup.Foldable
minimum :: forall f a. Ord a => Foldable1 f => f a -> a
P purescript-foldable-traversable M Data.Semigroup.Foldable
or :: forall a f. Foldable f => HeytingAlgebra a => f a -> a

The disjunction of all the values in a data structure. When specialized to Boolean, this function will test whether any of the values in a data structure is true.

P purescript-foldable-traversable M Data.Foldable
product :: forall a f. Foldable f => Semiring a => f a -> a

Find the product of the numeric values in a data structure.

P purescript-foldable-traversable M Data.Foldable
sum :: forall a f. Foldable f => Semiring a => f a -> a

Find the sum of the numeric values in a data structure.

P purescript-foldable-traversable M Data.Foldable