Search results

fmapL :: forall r e' e. (e -> e') -> Either e r -> Either e' r

Map a function over the Left value of an Either

P purescript-errors M Data.EitherR
mapLeft :: forall l r l2. (l -> l2) -> Either l r -> Either l2 r
P purescript-meowclient M MeowClient.Utils
lmap :: forall f a b c. Bifunctor f => (a -> b) -> f a c -> f b c

Map a function over the first type argument of a Bifunctor.

P purescript-bifunctors M Data.Bifunctor
lcmap :: forall a b c p. Profunctor p => (a -> b) -> p b c -> p a c

Map a function over the (contravariant) first type argument only.

P purescript-profunctor M Data.Profunctor
dlmap :: forall p c b a. Profunctor p => (a -> b) -> p b c -> p a c
P purescript-stuff M Stuff
throwLeftAs :: forall err m left right. MonadThrow err m => (left -> err) -> Either left right -> m right

Turns a Left a into an exception which reduces nesting

P purescript-yoga-om M Yoga.Om
wrapIso :: forall p t a. Profunctor p => Newtype t a => (a -> t) -> p a a -> p t t
P purescript-profunctor M Data.Profunctor
wrapIso :: forall v1 v0 p. HasDimap Function p => Newtype v0 v1 => ObjectOf Function v1 => ObjectOf Function v0 => (v0 -> v1) -> p v0 v0 -> p v1 v1
P purescript-subcategory M Control.Subcategory.Profunctor.HasDimap
rmap :: forall f a b c. Bifunctor f => (b -> c) -> f a b -> f a c

Map a function over the second type arguments of a Bifunctor.

P purescript-bifunctors M Data.Bifunctor
rmap :: forall a b c p. Profunctor p => (b -> c) -> p a b -> p a c

Map a function over the (covariant) second type argument only.

P purescript-profunctor M Data.Profunctor
drmap :: forall p c b a. Profunctor p => (b -> c) -> p a b -> p a c
P purescript-stuff M Stuff
censor :: forall w m a. MonadWriter w m => (w -> w) -> m a -> m a

Modify the final accumulator value by applying a function.

P purescript-transformers M Control.Monad.Writer.Class
local :: forall e w a. ComonadEnv e w => (e -> e) -> w a -> w a
P purescript-transformers M Control.Comonad.Env.Class
local :: forall r m a. MonadReader r m => (r -> r) -> m a -> m a
P purescript-transformers M Control.Monad.Reader.Class
seeks :: forall s a w. ComonadStore s w => (s -> s) -> w a -> w a

Reposition the focus at the specified position, which depends on the current position.

P purescript-transformers M Control.Comonad.Store.Class
censorAccum :: forall acc html a. Accum acc html => (acc -> acc) -> html a -> html a
P purescript-chameleon-transformers M Chameleon.Transformers.Accum.Class
setCtx :: forall ctx html a. Ctx ctx html => (ctx -> ctx) -> html a -> html a
P purescript-chameleon-transformers M Chameleon.Transformers.Ctx.Class
mapErr :: forall e m a. MonadError e m => (e -> e) -> m a -> m a
P purescript-ts-bridge M TsBridge.Types
defaultFilter :: forall a h f. BooleanEq h => Applicative f => Foldable f => Monoid (f a) => (a -> h) -> f a -> f a
P purescript-filterables M Data.Filterable
filter :: forall f h a. Filterable f => BooleanEq h => (a -> h) -> f a -> f a
P purescript-filterables M Data.Filterable
liftA1 :: forall f a b. Applicative f => (a -> b) -> f a -> f b

liftA1 provides a default implementation of (<$>) for any Applicative functor, without using (<$>) as provided by the Functor-Applicative superclass relationship.

liftA1 can therefore be used to write Functor instances as follows:

instance functorF :: Functor F where
  map = liftA1
P purescript-prelude M Control.Applicative
liftM1 :: forall m a b. Monad m => (a -> b) -> m a -> m b

liftM1 provides a default implementation of (<$>) for any Monad, without using (<$>) as provided by the Functor-Monad superclass relationship.

liftM1 can therefore be used to write Functor instances as follows:

instance functorF :: Functor F where
  map = liftM1
P purescript-prelude M Control.Monad
map :: forall f a b. Functor f => (a -> b) -> f a -> f b
P purescript-prelude M Data.Functor
mapDefault :: forall i f a b. FunctorWithIndex i f => (a -> b) -> f a -> f b

A default implementation of Functor's map in terms of mapWithIndex

P purescript-foldable-traversable M Data.FunctorWithIndex
cmap :: forall f a b. Contravariant f => (b -> a) -> f a -> f b
P purescript-contravariant M Data.Functor.Contravariant
squigglyMap :: forall f a b. Functor f => (a -> b) -> f a -> f b
P purescript-signal M Signal
map :: forall p q a b. Dissect p q => (a -> b) -> p a -> p b

A tail-recursive map operation, implemented in terms of Dissect.

P purescript-dissect M Dissect.Class
map :: forall a c b. HasMap a => (b -> c) -> a b -> a c
P purescript-neon M Neon.Class.HasMap
map :: forall f a b. Functor f => (a -> b) -> f a -> f b
P purescript-qualified-do M QualifiedDo.ParApply
peeks :: forall s a w. ComonadStore s w => (s -> s) -> w a -> a

Extract a value from a position which depends on the current position.

P purescript-transformers M Control.Comonad.Store.Class
mapFlipped :: forall v1 v0 f c. HasMap c f => ObjectOf c v0 => ObjectOf c v1 => f v0 -> c v0 v1 -> f v1
P purescript-subcategory M Control.Subcategory.Functor.HasMap
asks :: forall e1 e2 w a. ComonadAsk e1 w => (e1 -> e2) -> w a -> e2

Get a value which depends on the environment.

P purescript-transformers M Control.Comonad.Env.Class
amodify :: forall m r s. MonadEffect m => Refer s r => (s -> s) -> r -> m s
P purescript-webb-refer M Webb.State.Prelude
iterate :: forall a u. Unfoldable1 u => (a -> a) -> a -> u a

Create an infinite Unfoldable1 by repeated application of a function to a seed value. Analogous to iterateN, but with no iteration limit.

This should only be used to produce either lazy types (like lazy Lists) or types with truncating Unfoldable1 instances (like Maybe).

P purescript-trivial-unfold M Data.Unfoldable1.Trivial1
all :: forall a b f. Foldable f => HeytingAlgebra b => (a -> b) -> f a -> b

all f is the same as and <<< map f; map a function over the structure, and then get the conjunction of the results.

P purescript-foldable-traversable M Data.Foldable
any :: forall a b f. Foldable f => HeytingAlgebra b => (a -> b) -> f a -> b

any f is the same as or <<< map f; map a function over the structure, and then get the disjunction of the results.

P purescript-foldable-traversable M Data.Foldable
foldMap :: forall f a m. Foldable f => Monoid m => (a -> m) -> f a -> m
P purescript-foldable-traversable M Data.Foldable
foldMap1 :: forall t a m. Foldable1 t => Semigroup m => (a -> m) -> t a -> m
P purescript-foldable-traversable M Data.Semigroup.Foldable
foldMap1DefaultL :: forall t m a. Foldable1 t => Functor t => Semigroup m => (a -> m) -> t a -> m

A default implementation of foldMap1 using foldl1.

Note: when defining a Foldable1 instance, this function is unsafe to use in combination with foldl1Default.

P purescript-foldable-traversable M Data.Semigroup.Foldable
foldMap1DefaultR :: forall t m a. Foldable1 t => Functor t => Semigroup m => (a -> m) -> t a -> m

A default implementation of foldMap1 using foldr1.

Note: when defining a Foldable1 instance, this function is unsafe to use in combination with foldr1Default.

P purescript-foldable-traversable M Data.Semigroup.Foldable
foldMapDefault :: forall i f a m. FoldableWithIndex i f => Monoid m => (a -> m) -> f a -> m

A default implementation of foldMap using foldMapWithIndex

P purescript-foldable-traversable M Data.FoldableWithIndex
foldMapDefaultL :: forall f a m. Foldable f => Monoid m => (a -> m) -> f a -> m

A default implementation of foldMap using foldl.

Note: when defining a Foldable instance, this function is unsafe to use in combination with foldlDefault.

P purescript-foldable-traversable M Data.Foldable
foldMapDefaultR :: forall f a m. Foldable f => Monoid m => (a -> m) -> f a -> m

A default implementation of foldMap using foldr.

Note: when defining a Foldable instance, this function is unsafe to use in combination with foldrDefault.

P purescript-foldable-traversable M Data.Foldable
tracks :: forall w a t. ComonadTraced t w => (a -> t) -> w a -> a

Extracts a value at a relative position which depends on the current value.

P purescript-transformers M Control.Comonad.Traced.Class
areads :: forall m r s a. MonadEffect m => Refer s r => (s -> a) -> r -> m a
P purescript-webb-refer M Webb.State.Prelude
liftF :: forall b a f. Applicative f => (a -> b) -> a -> f b
P purescript-simple-parser M Text.Parsing.Util
applySecond :: forall a b f. Apply f => f a -> f b -> f b

Combine two effectful actions, keeping only the result of the second.

P purescript-prelude M Control.Apply
modify :: forall t a. Newtype t a => (a -> a) -> t -> t

This combinator unwraps the newtype, applies a monomorphic function to the contained value and wraps the result back in the newtype

P purescript-newtype M Data.Newtype
fromLeft :: forall a b. a -> Either a b -> a

A function that extracts the value from the Left data constructor. The first argument is a default value, which will be returned in the case where a Right is passed to fromLeft.

P purescript-either M Data.Either
fromRight :: forall a b. b -> Either a b -> b

A function that extracts the value from the Right data constructor. The first argument is a default value, which will be returned in the case where a Left is passed to fromRight.

P purescript-either M Data.Either