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 a b f. 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 b c a. HasMap a => (b -> c) -> a b -> a c
P purescript-neon M Neon.Class.HasMap
defaultFilter :: forall f h a. BooleanEq h => Applicative f => Foldable f => Monoid (f a) => (a -> h) -> f a -> f a
P purescript-filterables M Data.Filterable
filter :: forall a h f. Filterable f => BooleanEq h => (a -> h) -> f a -> f a
P purescript-filterables M Data.Filterable
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 a w e. ComonadEnv e w => (e -> e) -> w a -> w a
P purescript-transformers M Control.Comonad.Env.Class
local :: forall a m r. 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
cmap :: forall a b f. Contravariant f => (b -> a) -> f a -> f b
P purescript-contravariant M Data.Functor.Contravariant
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 a m f. Foldable f => Monoid m => (a -> m) -> f a -> m
P purescript-foldable-traversable M Data.Foldable
foldMap1 :: forall a m t. Foldable1 t => Semigroup m => (a -> m) -> t a -> m
P purescript-foldable-traversable M Data.Semigroup.Foldable
foldMap1Default :: forall t m a. Foldable1 t => Functor t => Semigroup m => (a -> m) -> t a -> m

A default implementation of foldMap1 using fold1.

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
asks :: forall e1 e2 w. ComonadEnv e1 w => (e1 -> e2) -> w e1 -> e2

Get a value which depends on the environment.

P purescript-transformers M Control.Comonad.Env.Class
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
sampleOn_ :: 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-event M FRP.Event.Class
applyFirst :: forall c f v0 v1. 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 f a b. Applicative f => (a -> b) -> a -> f b
P purescript-simple-parser M Text.Parsing.Util
getOrAlt :: forall f g h l r r' s v. 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 a f. 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 a f. Ord1 f => f a -> f a -> f a
P purescript-higher-order M Data.Operator.Ord
min1 :: forall a f. Ord1 f => f a -> f a -> f a
P purescript-higher-order M Data.Operator.Ord
onIntegrityError :: forall a m. MonadError PGError m => m a -> m a -> m a
P purescript-postgresql-client M Database.PostgreSQL.PG
alt :: forall a f. Alternative f => f a -> f a -> f a
P purescript-invertible-syntax M Text.Syntax.Classes
dappend :: forall a cnt. Diff cnt => cnt a -> cnt a -> cnt a
P purescript-difference-containers M Containers.Difference
interleave :: forall a m. MonadLogic m => m a -> m a -> m a
P purescript-logic M Control.Monad.Logic.Class
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
applySecond :: forall c f v0 v1. 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 f c a. 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 f c a. 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 f a b. 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
scalarMul :: forall k f. 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 a t. Consable t => a -> t a -> t a
P purescript-consable M Data.Consable
cons :: forall a f. Container f => a -> f a -> f a
P purescript-logoot-core M Data.Container
insert :: forall a f. Container f => Ord a => a -> f a -> f a
P purescript-logoot-core M Data.Container
option :: forall m a. Alternative m => a -> m a -> m a
P purescript-parsers M Text.Parsing.Combinators
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
op :: forall t a. Newtype t a => (a -> t) -> t -> a

Deprecated previous name of un.

P purescript-newtype M Data.Newtype
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
flipScalarMul :: forall f k. VectorField f k => f k -> k -> f k
P purescript-vectorfield M Data.VectorField
get :: forall f g l r r' s v. 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 f g l0 l1 r0 r1 v. 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 a b. Tabulate a => (a -> b) -> a -> b

Memoize a function of one argument

P purescript-memoize M Data.Function.Memoize
applicator :: forall a b. (a -> b) -> a -> b

A combinator - applicator

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

λ f x . f x

P purescript-birds M Aviary.Birds
idstar :: forall a b. (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
mapUndefined :: forall a b. (a -> b) -> a -> b
P purescript-reactnative M ReactNative.Internal.Undefinable
moldMap :: forall m e t. Moldable t e => Monoid m => (e -> m) -> t -> m
P purescript-moldy M Data.Moldy
moldMapDefaultL :: forall t e m. Moldable t e => Monoid m => (e -> m) -> t -> m
P purescript-moldy M Data.Moldy
moldMapDefaultR :: forall t e m. Moldable t e => Monoid m => (e -> m) -> t -> m

A default implementation of moldMap based on moldr

P purescript-moldy M Data.Moldy
snoc :: forall a f. 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 r v s g f. 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 f g r s v. Cons s v () r => Lacks s () => RSingleton f g s => g s -> v -> f r
P purescript-struct M Data.Struct.Singleton
functorDecorateFlipped :: forall f a b. Functor f => Decorate b a => f a -> b -> f b
P purescript-materialize M Materialize.Markup.Decorate
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
askRunBase :: forall base m stM a. MonadBaseUnlift base m stM => Applicative base => m (m a -> base a)
P purescript-monad-unlift M Control.Monad.Trans.Unlift
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
intercalate :: forall f m. Foldable f => Monoid m => m -> f m -> m

Fold a data structure, accumulating values in some Monoid, combining adjacent elements using the specified separator.

For example:

> intercalate ", " ["Lorem", "ipsum", "dolor"]
= "Lorem, ipsum, dolor"

> intercalate "*" ["a", "b", "c"]
= "a*b*c"

> intercalate [1] [[2, 3], [4, 5], [6, 7]]
= [2, 3, 1, 4, 5, 1, 6, 7]
P purescript-foldable-traversable M Data.Foldable
intercalate :: forall f m. Foldable1 f => Semigroup m => m -> f m -> m

Fold a data structure using a Semigroup instance, combining adjacent elements using the specified separator.

P purescript-foldable-traversable M Data.Semigroup.Foldable
surround :: forall f m. Foldable f => Semigroup m => m -> f m -> m

fold but with each element surrounded by some fixed value.

For example:

> surround "*" []
= "*"

> surround "*" ["1"]
= "*1*"

> surround "*" ["1", "2"]
= "*1*2*"

> surround "*" ["1", "2", "3"]
= "*1*2*3*"
P purescript-foldable-traversable M Data.Foldable
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
enumFromTo :: forall a u. Enum a => Unfoldable1 u => a -> a -> u a

Returns a contiguous sequence of elements from the first value to the second value (inclusive).

enumFromTo 0 3 = [0, 1, 2, 3]
enumFromTo 'c' 'a' = ['c', 'b', 'a']

The example shows Array return values, but the result can be any type with an Unfoldable1 instance.

P purescript-enums M Data.Enum
asks :: forall r m a. MonadAsk r m => (r -> a) -> m a

Projects a value from the global context in a MonadAsk.

P purescript-transformers M Control.Monad.Reader.Class
gets :: forall s m a. MonadState s m => (s -> a) -> m a

Get a value which depends on the current state.

P purescript-transformers M Control.Monad.State.Class
peek :: forall a w s. ComonadStore s w => s -> w a -> a
P purescript-transformers M Control.Comonad.Store.Class
track :: forall a w t. ComonadTraced t w => t -> w a -> a
P purescript-transformers M Control.Comonad.Traced.Class
unwrapCofree :: forall a w f. ComonadCofree f w => w a -> f (w a)
P purescript-free M Control.Comonad.Cofree.Class
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
buildLeaf :: forall v p f e. ElementBuilder e f p v => e -> f p -> v
P purescript-concur-core M Concur.Core.ElementBuilder
invokeAction :: forall act ctrl args res m. RemoteAction act ctrl args res => MonadReader Visualforce m => MonadAff m => MonadError RemoteActionError m => IsSymbol ctrl => Encode args => Decode res => act -> args -> m res

Function that invoke the action defined by referring to contraints which holds details about the correct controller to invoke. Example:

data PCMRequests = ..

data CreatePCMRequests = CreatePCMRequests

instance remoteActionCreatePCMs :: RemoteAction CreatePCMRequests "PCMMassController.createRecords" PCMRequests Unit

createPCMRequest :: Visualforce -> PCMRequests -> Aff (Either RemoteActionError Unit)
createPCMRequest vf rec =  runReaderT (runExceptT $ invokeAction CreatePCMRequests rec) vf
P purescript-sforce-remote-action M Salesforce.RemoteAction
tabulate :: forall b a f. Representable f a => (a -> b) -> f b
P purescript-functor-vector M Data.Functor.Representable
fix :: forall l. Lazy l => (l -> l) -> l

fix defines a value as the fixed point of a function.

The Lazy instance allows us to generate the result lazily.

P purescript-control M Control.Lazy
modify :: forall s m. MonadState s m => (s -> s) -> m s

Modify the state by applying a function to the current state. The returned value is the new state value.

P purescript-transformers M Control.Monad.State.Class
fix :: forall a. (a -> a) -> a

Fixed point Y combinator

Λ a . (a → a) → a

λ f . (λ x. f (x x)) (λ x . f (x x))

P purescript-birds M Aviary.Birds
fix :: forall a. (a -> a) -> a
P purescript-combinators M Data.Combinators
index :: forall b a f. Representable f a => f b -> (a -> b)
P purescript-functor-vector M Data.Functor.Representable
lift :: forall f g a. Applicative f => Applicative g => a -> f (g a)
P purescript-simple-parser M Text.Parsing.Util
add :: forall a. Semiring a => a -> a -> a
P purescript-prelude M Data.Semiring
append :: forall a. Semigroup a => a -> a -> a
P purescript-prelude M Data.Semigroup
conj :: forall a. HeytingAlgebra a => a -> a -> a
P purescript-prelude M Data.HeytingAlgebra
const :: forall a b. a -> b -> a

Returns its first argument and ignores its second.

const 1 "hello" = 1
P purescript-prelude M Data.Function
disj :: forall a. HeytingAlgebra a => a -> a -> a
P purescript-prelude M Data.HeytingAlgebra
div :: forall a. EuclideanRing a => a -> a -> a
P purescript-prelude M Data.EuclideanRing
gcd :: forall a. Eq a => EuclideanRing a => a -> a -> a

The greatest common divisor of two values.

P purescript-prelude M Data.EuclideanRing
implies :: forall a. HeytingAlgebra a => a -> a -> a
P purescript-prelude M Data.HeytingAlgebra