Search results

fromMaybe :: forall a. a -> Maybe a -> a

Takes a default value, and a Maybe value. If the Maybe value is Nothing the default value is returned, otherwise the value inside the Just is returned.

fromMaybe x Nothing == x
fromMaybe x (Just y) == y
P purescript-maybe M Data.Maybe
withDefault :: forall a. a -> Maybe a -> a

If the given value is Nothing, return the default. Otherwise return the value.

withDefault 2 Nothing -- 2
withDefault 2 (Just 1) -- 1
P purescript-neon M Neon.Helper
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
consMax :: forall a f. Foldable f => Ord a => a -> f a -> a
P purescript-liminal M Data.Geometry.BoundingBox
consMin :: forall a f. Foldable f => Ord a => a -> f a -> a
P purescript-liminal M Data.Geometry.BoundingBox
peek :: forall s w a. ComonadStore s w => s -> w a -> a
P purescript-transformers M Control.Comonad.Store.Class
track :: forall t w a. ComonadTraced t w => t -> w a -> a
P purescript-transformers M Control.Comonad.Traced.Class
buildLeaf :: forall e f p v. ElementBuilder e f p v => e -> f p -> v
P purescript-concur-core M Concur.Core.ElementBuilder
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

It can also be thought of as creating a function that ignores its argument:

const 1 = \_ -> 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
genericAdd :: forall a rep. Generic a rep => GenericSemiring rep => a -> a -> a

A Generic implementation of the add member from the Semiring type class.

P purescript-prelude M Data.Semiring.Generic
genericAdd' :: forall a. GenericSemiring a => a -> a -> a
P purescript-prelude M Data.Semiring.Generic
genericAppend :: forall a rep. Generic a rep => GenericSemigroup rep => a -> a -> a

A Generic implementation of the append member from the Semigroup type class.

P purescript-prelude M Data.Semigroup.Generic
genericAppend' :: forall a. GenericSemigroup a => a -> a -> a
P purescript-prelude M Data.Semigroup.Generic
genericConj :: forall a rep. Generic a rep => GenericHeytingAlgebra rep => a -> a -> a

A Generic implementation of the conj member from the HeytingAlgebra type class.

P purescript-prelude M Data.HeytingAlgebra.Generic
genericConj' :: forall a. GenericHeytingAlgebra a => a -> a -> a
P purescript-prelude M Data.HeytingAlgebra.Generic
genericDisj :: forall a rep. Generic a rep => GenericHeytingAlgebra rep => a -> a -> a

A Generic implementation of the disj member from the HeytingAlgebra type class.

P purescript-prelude M Data.HeytingAlgebra.Generic
genericDisj' :: forall a. GenericHeytingAlgebra a => a -> a -> a
P purescript-prelude M Data.HeytingAlgebra.Generic
genericImplies :: forall a rep. Generic a rep => GenericHeytingAlgebra rep => a -> a -> a

A Generic implementation of the implies member from the HeytingAlgebra type class.

P purescript-prelude M Data.HeytingAlgebra.Generic
genericImplies' :: forall a. GenericHeytingAlgebra a => a -> a -> a
P purescript-prelude M Data.HeytingAlgebra.Generic
genericMul :: forall a rep. Generic a rep => GenericSemiring rep => a -> a -> a

A Generic implementation of the mul member from the Semiring type class.

P purescript-prelude M Data.Semiring.Generic
genericMul' :: forall a. GenericSemiring a => a -> a -> a
P purescript-prelude M Data.Semiring.Generic
genericSub :: forall a rep. Generic a rep => GenericRing rep => a -> a -> a

A Generic implementation of the sub member from the Ring type class.

P purescript-prelude M Data.Ring.Generic
genericSub' :: forall a. GenericRing a => a -> a -> a
P purescript-prelude M Data.Ring.Generic
implies :: forall a. HeytingAlgebra a => a -> a -> a
P purescript-prelude M Data.HeytingAlgebra
lcm :: forall a. Eq a => EuclideanRing a => a -> a -> a

The least common multiple of two values.

P purescript-prelude M Data.EuclideanRing
leftDiv :: forall a. DivisionRing a => a -> a -> a

Left division, defined as leftDiv a b = recip b * a. Left and right division are distinct in this module because a DivisionRing is not necessarily commutative.

If the type a is also a EuclideanRing, then this function is equivalent to div from the EuclideanRing class. When working abstractly, div should generally be preferred, unless you know that you need your code to work with noncommutative rings.

P purescript-prelude M Data.DivisionRing
max :: forall a. Ord a => a -> a -> a

Take the maximum of two values. If they are considered equal, the first argument is chosen.

P purescript-prelude M Data.Ord
min :: forall a. Ord a => a -> a -> a

Take the minimum of two values. If they are considered equal, the first argument is chosen.

P purescript-prelude M Data.Ord
mod :: forall a. EuclideanRing a => a -> a -> a
P purescript-prelude M Data.EuclideanRing
mul :: forall a. Semiring a => a -> a -> a
P purescript-prelude M Data.Semiring
rightDiv :: forall a. DivisionRing a => a -> a -> a

Right division, defined as rightDiv a b = a * recip b. Left and right division are distinct in this module because a DivisionRing is not necessarily commutative.

If the type a is also a EuclideanRing, then this function is equivalent to div from the EuclideanRing class. When working abstractly, div should generally be preferred, unless you know that you need your code to work with noncommutative rings.

P purescript-prelude M Data.DivisionRing
sub :: forall a. Ring a => a -> a -> a
P purescript-prelude M Data.Ring
call :: forall s. IsString s => Monoid s => s -> s -> s

Syntax for CSS function call.

P purescript-css M CSS.Common
ract :: forall g s. RightAction g s => s -> g -> s
P purescript-group M Data.Group.Action
maddL :: forall x r. LeftModule x r => x -> x -> x
P purescript-modules M Data.Ring.Module
maddR :: forall x r. RightModule x r => x -> x -> x
P purescript-modules M Data.Ring.Module
mmulR :: forall x r. RightModule x r => x -> r -> x
P purescript-modules M Data.Ring.Module
msubL :: forall x r. LeftModule x r => x -> x -> x
P purescript-modules M Data.Ring.Module
msubR :: forall x r. RightModule x r => x -> x -> x
P purescript-modules M Data.Ring.Module
bindTo :: forall f o. f -> o -> f
P purescript-ffi-simple M FFI.Simple.Functions
defaultUndef :: forall a. a -> a -> a
P purescript-ffi-simple M FFI.Simple.Undef
join :: forall a. JoinSemilattice a => a -> a -> a
P purescript-lattice M Data.Lattice
meet :: forall a. MeetSemilattice a => a -> a -> a
P purescript-lattice M Data.Lattice
pathAppend :: forall m. XPathLike m => m -> m -> m

Put a path seperator between two XPaths and return the resulting XPath.

P purescript-xpath-like M Data.XPath
pathAppendNSx :: forall m. XPathLike m => m -> m -> m

Useful variant of pathAppend needed for some XPath implementations; insert a separator with a dummy namespace ("x") for the second XPath fragment. For example: root /? "record" /? "identifier" == "/x:record/x:identifier".

P purescript-xpath-like M Data.XPath
and :: forall a. Binary a => a -> a -> a
P purescript-binary M Data.Binary
join :: forall a. JoinSemilattice a => a -> a -> a
P purescript-colehaus-lattice M Data.Lattice
maddL :: forall x r. LeftModule x r => x -> x -> x
P purescript-ring-modules M Data.Ring.Module
maddR :: forall x r. RightModule x r => x -> x -> x
P purescript-ring-modules M Data.Ring.Module
meet :: forall a. MeetSemilattice a => a -> a -> a
P purescript-colehaus-lattice M Data.Lattice
mmulR :: forall x r. RightModule x r => x -> r -> x
P purescript-ring-modules M Data.Ring.Module
msubL :: forall x r. LeftModule x r => x -> x -> x
P purescript-ring-modules M Data.Ring.Module
msubR :: forall x r. RightModule x r => x -> x -> x
P purescript-ring-modules M Data.Ring.Module
nand :: forall α. HeytingAlgebra α => α -> α -> α
P purescript-unicode-prelude M Data.HeytingAlgebra.Unicode
nor :: forall α. HeytingAlgebra α => α -> α -> α
P purescript-unicode-prelude M Data.HeytingAlgebra.Unicode
or :: forall a. Binary a => a -> a -> a
P purescript-binary M Data.Binary
patch :: forall a d. Patch a d => a -> d -> a
P purescript-incremental-functions M Data.Incremental
reciprocal :: forall n n1 n2 a r. Add n2 1 n1 => Add n1 1 n => Arity a n => Divisible r => Eq r => EuclideanRing r => Leadable r => Ord r => Pad n2 (Polynomial r) a => Peel r r => Unpad n2 (Polynomial r) a => a -> a -> a

Computes the reciprocal of the first polynomial in the extension whose minimal polynomial is provided by the second polynomial

P purescript-numberfield M Data.Algebraic.NumberField
xor :: forall a. Binary a => a -> a -> a
P purescript-binary M Data.Binary
xor :: forall a. HeytingAlgebra a => a -> a -> a
P purescript-boolean-eq M Data.BooleanEq
xor :: forall α. HeytingAlgebra α => α -> α -> α
P purescript-unicode-prelude M Data.HeytingAlgebra.Unicode
_add :: forall a. HasAdd a => a -> a -> a
P purescript-neon M Neon.Operator
_and :: forall a. HasAnd a => a -> a -> a
P purescript-neon M Neon.Operator
_divide :: forall a. HasDivide a => a -> a -> a
P purescript-neon M Neon.Operator
_multiply :: forall a. HasMultiply a => a -> a -> a
P purescript-neon M Neon.Operator
_or :: forall a. HasOr a => a -> a -> a
P purescript-neon M Neon.Operator
_power :: forall a. HasPower a => a -> a -> a
P purescript-neon M Neon.Operator
_remainder :: forall a. HasRemainder a => a -> a -> a
P purescript-neon M Neon.Operator
_subtract :: forall a. HasSubtract a => a -> a -> a
P purescript-neon M Neon.Operator
add :: forall a. HasAdd a => a -> a -> a
P purescript-neon M Neon.Class.HasAdd
always :: forall b a. a -> b -> a

Always returns the first argument.

"anything" :always 1 -- 1

This is the constant function.

P purescript-neon M Neon.Primitive.Function
and :: forall a. HasAnd a => a -> a -> a
P purescript-neon M Neon.Class.HasAnd
asTypeOf :: forall a. a -> a -> a

A type-restricted version of always.

[] :asTypeOf [1] -- [] :: Array Int
P purescript-neon M Neon.Helper
decorate :: forall a b. Decorate a b => a -> b -> a
P purescript-materialize M Materialize.Markup.Decorate
divide :: forall a. HasDivide a => a -> a -> a
P purescript-neon M Neon.Class.HasDivide
getAllArgs :: forall all given. OptArgs all given => all -> given -> all
P purescript-interactive-data M InteractiveData.Core.Classes.OptArgs
kestrel :: forall b a. a -> b -> a

K combinator - kestrel

K

Λ a b . a → b → a

λ x y . x

P purescript-birds M Aviary.Birds
max :: forall a. HasGreater a => a -> a -> a

Returns the greater value.

max 1 2 -- 2
max 2 1 -- 2
P purescript-neon M Neon.Helper
maxByOrder :: forall a. Ord a => a -> a -> a
P purescript-liminal M Data.Geometry.BoundingBox
min :: forall a. HasLess a => a -> a -> a

Returns the lesser value.

min 1 2 -- 1
min 2 1 -- 1
P purescript-neon M Neon.Helper
minByOrder :: forall a. Ord a => a -> a -> a
P purescript-liminal M Data.Geometry.BoundingBox
multiply :: forall a. HasMultiply a => a -> a -> a
P purescript-neon M Neon.Class.HasMultiply
or :: forall a. HasOr a => a -> a -> a
P purescript-neon M Neon.Class.HasOr
or :: forall a. Bitwise a => a -> a -> a
P purescript-webgpu M Web.GPU.Internal.Bitwise
plus :: forall a b. Summable a b => a -> b -> a
P purescript-canvas-geometry M Graphics.Canvas.Geometry
plus :: forall a b. Summable a b => a -> b -> a
P purescript-geometry-plane M Data.Geometry.Plane
power :: forall a. HasPower a => a -> a -> a
P purescript-neon M Neon.Class.HasPower
remainder :: forall a. HasRemainder a => a -> a -> a
P purescript-neon M Neon.Class.HasRemainder
scale :: forall a. Space a => a -> (a -> a)
P purescript-dual-numbers M Data.Number.Dual
subtract :: forall a. HasSubtract a => a -> a -> a
P purescript-neon M Neon.Class.HasSubtract
withAttribute :: forall a b. HasAttribute a b => a -> b -> a

Add an attribute to element node

P purescript-bonsai M Bonsai.Html.Internal
sans :: forall m a b. At m a b => a -> m -> m
P purescript-profunctor-lenses M Data.Lens.At