Search results

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
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
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
cmap :: forall f a b. Contravariant f => (b -> a) -> f a -> f b
P purescript-contravariant M Data.Functor.Contravariant
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
applyFirst :: forall a b f. Apply f => f a -> f b -> f a

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

P purescript-prelude M Control.Apply
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
sampleOnRight_ :: forall event a b. IsEvent event => event a -> event b -> event a

Create an Event which samples the latest values from the first event at the times when the second event fires, ignoring the values produced by the second event.

P purescript-hyrule M FRP.Event.Class
sampleOn_ :: forall b a event. IsEvent event => event a -> event b -> event a

Create an Event which samples the latest values from the first event at the times when the second event fires, ignoring the values produced by the second event.

P purescript-event M FRP.Event.Class
applyFirst :: forall v1 v0 f c. HasApply c f => HasConst c => HasMap c f => ObjectOf c v0 => ObjectOf c v1 => ObjectOf c (c v1 v0) => f v0 -> f v1 -> f v0
P purescript-subcategory M Control.Subcategory.Functor.HasApply
liftF :: forall b a f. Applicative f => (a -> b) -> a -> f b
P purescript-simple-parser M Text.Parsing.Util
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
mulNat :: forall proxy a b c. ProductNat a b c => proxy a -> proxy b -> proxy c
P purescript-typelevel-peano M Type.Data.Peano.Nat.Definition
plus :: forall proxy a b c. SumInt a b c => proxy a -> proxy b -> proxy c
P purescript-typelevel-peano M Type.Data.Peano.Int.Definition
plusNat :: forall proxy a b c. SumNat a b c => proxy a -> proxy b -> proxy c
P purescript-typelevel-peano M Type.Data.Peano.Nat.Definition
powNat :: forall proxy a b c. ExponentiationNat a b c => proxy a -> proxy b -> proxy c
> powNat d2 d3
8 -- : NProxy D8

a raised to the power of b a^b = c

P purescript-typelevel-peano M Type.Data.Peano.Nat.Definition
prod :: forall proxy a b c. ProductInt a b c => proxy a -> proxy b -> proxy c
P purescript-typelevel-peano M Type.Data.Peano.Int.Definition
concat :: forall xs ys zs lproxy. Concat xs ys zs => lproxy xs -> lproxy ys -> lproxy zs
P purescript-typelevel-lists M Type.Data.List
drop :: forall n xs ys lproxy iproxy. Drop n xs ys => iproxy n -> lproxy xs -> lproxy ys
P purescript-typelevel-lists M Type.Data.List
take :: forall n xs ys lproxy iproxy. Take n xs ys => iproxy n -> lproxy xs -> lproxy ys
P purescript-typelevel-lists M Type.Data.List
zip :: forall x y z lproxy. Zip x y z => lproxy x -> lproxy y -> lproxy z
P purescript-typelevel-lists M Type.Data.List
map :: forall f xs ys fproxy kproxy lproxy. Map f xs ys => fproxy f -> kproxy xs -> lproxy ys
P purescript-typelevel-lists M Type.Data.List
getOrAlt :: forall v s r' r l h g f. Alternative h => Cons s v r' r => RowToList r l => RGetOrAlt f g s l r => g s -> f r -> h v
P purescript-struct M Data.Struct.GetOrAlt.GetOrAlt
alt :: forall f a. Alt f => f a -> f a -> f a
P purescript-control M Control.Alt
choose :: forall m a. MonadGen m => m a -> m a -> m a

Creates a generator that outputs a value chosen from one of two existing existing generators with even probability.

P purescript-gen M Control.Monad.Gen
max1 :: forall f a. Ord1 f => f a -> f a -> f a
P purescript-higher-order M Data.Operator.Ord
min1 :: forall f a. Ord1 f => f a -> f a -> f a
P purescript-higher-order M Data.Operator.Ord
onIntegrityError :: forall m a. MonadError PGError m => m a -> m a -> m a
P purescript-postgresql-client M Database.PostgreSQL.PG
alt :: forall f a. Alternative f => f a -> f a -> f a
P purescript-invertible-syntax M Text.Syntax.Classes
dappend :: forall cnt a. Diff cnt => cnt a -> cnt a -> cnt a
P purescript-difference-containers M Containers.Difference
interleave :: forall m a. MonadLogic m => m a -> m a -> m a
P purescript-logic M Control.Monad.Logic.Class
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
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
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
sampleOnLeft_ :: forall event a b. IsEvent event => event a -> event b -> event b
P purescript-hyrule M FRP.Event.Class
applySecond :: forall v1 v0 f c. HasApply c f => HasConst c => HasIdentity c => HasMap c f => ObjectOf c v0 => ObjectOf c v1 => ObjectOf c (c v1 v1) => ObjectOf c (c v0 (c v1 v1)) => ObjectOf c (c (c v1 v1) (c v0 (c v1 v1))) => f v0 -> f v1 -> f v1
P purescript-subcategory M Control.Subcategory.Functor.HasApply
fromFoldableL :: forall a c f. Foldable f => Consable c => c a -> f a -> c a

Conversion from Foldable to Consable using foldl.

fromFoldableL [] [1,2,3,4]  == [4,3,2,1]
fromFoldableL [0] [1,2,3,4] == [4,3,2,1,0]
P purescript-consable M Data.Consable
fromFoldableR :: forall a c f. Foldable f => Consable c => c a -> f a -> c a

Conversion from Foldable to Consable using foldr.

fromFoldableR [] [1,2,3,4]  == [1,2,3,4]
fromFoldableR [5] [1,2,3,4] == [1,2,3,4,5]
P purescript-consable M Data.Consable
voidRight :: forall f a b. Functor f => a -> f b -> f a

Ignore the return value of a computation, using the specified return value instead.

P purescript-prelude M Data.Functor
functorDecorate :: forall b a f. Functor f => Decorate a b => a -> f b -> f a
P purescript-materialize M Materialize.Markup.Decorate
seek :: forall s a w. ComonadStore s w => s -> w a -> w a

Reposition the focus at the specified position.

P purescript-transformers M Control.Comonad.Store.Class
filled :: forall m a style. MonadCanvasAction m => CanvasStyle style => style -> m a -> m a

Run a MonadCanvasAction with the given fillStyle, resetting it to the previous value after

P purescript-canvas-action M Graphics.CanvasAction
putCtx :: forall a html ctx. Ctx ctx html => ctx -> html a -> html a
P purescript-chameleon-transformers M Chameleon.Transformers.Ctx.Class
stroked :: forall m a style. MonadCanvasAction m => CanvasStyle style => style -> m a -> m a

Run a MonadCanvasAction with the given strokeStyle, resetting it to the previous value after

P purescript-canvas-action M Graphics.CanvasAction
tellAccum :: forall acc html a. TellAccum acc html => acc -> html a -> html a
P purescript-chameleon-transformers M Chameleon.Transformers.Accum.Class
scalarMul :: forall f k. VectorField f k => k -> f k -> f k
  • ∀v in V: one * v == v
  • ∀a b in K, v in V: a * (b .* v) = (a * b) .* v
  • ∀a b in K, v in V:
    • a .* (u + v) = a .* u + a .* v
    • (a + b) .* v = a .* v + b .* v
P purescript-vectorfield M Data.VectorField
cons :: forall t a. Consable t => a -> t a -> t a
P purescript-consable M Data.Consable
cons :: forall f a. Container f => a -> f a -> f a
P purescript-logoot-core M Data.Container
insert :: forall f a. Container f => Ord a => a -> f a -> f a
P purescript-logoot-core M Data.Container
option :: forall a m. Alternative m => a -> m a -> m a
P purescript-parsers M Text.Parsing.Combinators
replaceInArray :: forall a f. HasUuid a => Functor f => a -> f a -> f a
P purescript-liminal M Classes.HasUuid
apply :: forall a b. (a -> b) -> a -> b

Applies a function to an argument. This is primarily used as the operator ($) which allows parentheses to be omitted in some cases, or as a natural way to apply a chain of composed functions to a value.

P purescript-prelude M Data.Function
un :: forall t a. Newtype t a => (a -> t) -> t -> a

Given a constructor for a Newtype, this returns the appropriate unwrap function.

P purescript-newtype M Data.Newtype
memoize :: forall a b. Tabulate a => (a -> b) -> a -> b

Memoize a function of one argument

P purescript-open-memoize M Data.Function.Memoize
flipScalarMul :: forall k f. VectorField f k => f k -> k -> f k
P purescript-vectorfield M Data.VectorField
get :: forall v s r' r l g f. Cons s v r' r => RGet f g s l r => RowToList r l => g s -> f r -> v
P purescript-struct M Data.Struct.Get.Get
match :: forall v r1 r0 l1 l0 g f. RMatch f g v l0 r0 l1 r1 => RowToList r0 l0 => RowToList r1 l1 => f r0 -> g r1 -> v
P purescript-struct M Data.Struct.Match.Match
memoize :: forall b a. Tabulate a => (a -> b) -> a -> b

Memoize a function of one argument

P purescript-memoize M Data.Function.Memoize
over :: forall s t a b @sym lenses. IsSymbol sym => ParseSymbol sym lenses => ConstructBarlow lenses Function s t a b => (a -> b) -> s -> t
P purescript-barlow-lens M Data.Lens.Barlow.Helpers
applicator :: forall b a. (a -> b) -> a -> b

A combinator - applicator

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

λ f x . f x

P purescript-birds M Aviary.Birds
foldMap :: forall a b s. Convert s (Statements a) => Monoid b => (a -> b) -> s -> b
P purescript-qualified-do M QualifiedDo.FoldMap
idstar :: forall b a. (a -> b) -> a -> b

I* combinator - id bird once removed

S(SK)

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

λ f x . f x

P purescript-birds M Aviary.Birds
local :: forall a b r. (a -> b) -> (Ask b => r) -> (Ask a => r)

Run a function over an implicit parameter

Note: Be careful while using this to map over the value without updating the type.

-- evaluates to `1`, not `2`
provide 1 (local ((*) 2) (ask @Int))
P purescript-ask M Control.Ask
mapUndefined :: forall b a. (a -> b) -> a -> b
P purescript-reactnative M ReactNative.Internal.Undefinable
memoize :: forall a b. (a -> b) -> a -> b

Memoize the function f. If the argument of f differs from the previous call, then f is recomputed.

P purescript-pha M Pha.Util
moldMap :: forall t e m. Moldable t e => Monoid m => (e -> m) -> t -> m
P purescript-moldy M Data.Moldy
moldMapDefaultL :: forall m e t. Moldable t e => Monoid m => (e -> m) -> t -> m
P purescript-moldy M Data.Moldy
moldMapDefaultR :: forall m e t. Moldable t e => Monoid m => (e -> m) -> t -> m

A default implementation of moldMap based on moldr

P purescript-moldy M Data.Moldy
nmap :: forall fa fb a b. NestedFunctor fa fb a b => (a -> b) -> fa -> fb
P purescript-nested-functor M Data.Functor.Nested
snoc :: forall f a. Container f => f a -> a -> f a
P purescript-logoot-core M Data.Container
voidLeft :: forall f a b. Functor f => f a -> b -> f b

A version of voidRight with its arguments flipped.

P purescript-prelude M Data.Functor
rsingleton :: forall f g s v r. RSingleton f g s => Cons s v () r => Lacks s () => g s -> v -> f r
P purescript-struct M Data.Struct.Singleton.RSingleton
singleton :: forall v s r g f. Cons s v () r => Lacks s () => RSingleton f g s => g s -> v -> f r
P purescript-struct M Data.Struct.Singleton
functorDecorateFlipped :: forall b a f. Functor f => Decorate b a => f a -> b -> f b
P purescript-materialize M Materialize.Markup.Decorate
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
transAnaT :: forall t f. Recursive t f => Corecursive t f => (t -> t) -> t -> t
P purescript-matryoshka M Matryoshka.Unfold
transCataT :: forall t f. Recursive t f => Corecursive t f => (t -> t) -> t -> t
P purescript-matryoshka M Matryoshka.Fold
everywhere :: forall a. Data a => (forall b. Data b => b -> b) -> a -> a

Apply a transformation everywhere, bottom-up

P purescript-ajnsit-typeable M Data.Data