Search results
padl :: Int -> Char -> String -> String
clamp :: forall a. Ord a => a -> a -> a -> a
Clamp a value between a minimum and a maximum. For example:
let f = clamp 0 10
f (-5) == 0
f 5 == 5
f 15 == 10
replicate :: forall f a. Unfoldable f => Int -> a -> f a
Replicate a value some natural number of times. For example:
replicate 2 "foo" == (["foo", "foo"] :: Array String)
replicate1 :: forall f a. Unfoldable1 f => Int -> a -> f a
Replicate a value n
times. At least one value will be produced, so values
n
less than 1 will be treated as 1.
replicate1 2 "foo" == (NEL.cons "foo" (NEL.singleton "foo") :: NEL.NonEmptyList String)
replicate1 0 "foo" == (NEL.singleton "foo" :: NEL.NonEmptyList String)
folding :: forall f x y z. Folding f x y z => f -> x -> y -> z
hfoldl :: forall f x a b. HFoldl f x a b => f -> x -> a -> b
hfoldlWithIndex :: forall f x a b. HFoldlWithIndex f x a b => f -> x -> a -> b
mappingWithIndex :: forall f i a b. MappingWithIndex f i a b => f -> i -> a -> b
convertOptionsWithDefaults :: forall t defaults provided all. ConvertOptionsWithDefaults t defaults provided all => t -> defaults -> provided -> all
applyTo :: forall f this a b. f -> this -> a -> b
Apply a function to a this object with the given arguments
addLeadingZeros :: forall a. Elastic a => Int -> a -> a
clamp :: forall a. HasGreater a => HasLess a => a -> a -> a -> a
Clamps a value between some bounds. If the lower bound is greater than the upper bound, they will be swapped.
2 :clamp 3 5 -- 3
4 :clamp 3 5 -- 4
6 :clamp 3 5 -- 5
6 :clamp 5 3 -- 5
folding :: forall f x y z. Folding f x y z => f -> x -> y -> z
hfoldl :: forall f x a b. HFoldl f x a b => f -> x -> a -> b
hfoldlWithIndex :: forall f x a b. HFoldlWithIndex f x a b => f -> x -> a -> b
mappingWithIndex :: forall f i a b. MappingWithIndex f i a b => f -> i -> a -> b
new2 :: forall b a2 a1 o. o -> a1 -> a2 -> b
offset :: forall q sql. ToOffset q => Resume q (Offset E) sql => Int -> q -> sql
OFFSET statement
Note: OFFSET must always follow after LIMIT or ORDER BY
replicate :: forall f a. Container f => Int -> a -> f a
setUuid :: forall m. HasUuid m => Int -> m -> m
add :: forall a. Semiring a => a -> a -> a
append :: forall a. Semigroup a => a -> a -> a
conj :: forall a. HeytingAlgebra a => a -> a -> a
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
disj :: forall a. HeytingAlgebra a => a -> a -> a
div :: forall a. EuclideanRing a => a -> a -> a
gcd :: forall a. Eq a => EuclideanRing a => a -> a -> a
The greatest common divisor of two values.
genericAdd :: forall a rep. Generic a rep => GenericSemiring rep => a -> a -> a
A Generic
implementation of the add
member from the Semiring
type class.
genericAdd' :: forall a. GenericSemiring a => a -> a -> a
genericAppend :: forall a rep. Generic a rep => GenericSemigroup rep => a -> a -> a
A Generic
implementation of the append
member from the Semigroup
type class.
genericAppend' :: forall a. GenericSemigroup a => a -> a -> a
genericConj :: forall a rep. Generic a rep => GenericHeytingAlgebra rep => a -> a -> a
A Generic
implementation of the conj
member from the HeytingAlgebra
type class.
genericConj' :: forall a. GenericHeytingAlgebra a => a -> a -> a
genericDisj :: forall a rep. Generic a rep => GenericHeytingAlgebra rep => a -> a -> a
A Generic
implementation of the disj
member from the HeytingAlgebra
type class.
genericDisj' :: forall a. GenericHeytingAlgebra a => a -> a -> a
genericImplies :: forall a rep. Generic a rep => GenericHeytingAlgebra rep => a -> a -> a
A Generic
implementation of the implies
member from the HeytingAlgebra
type class.
genericImplies' :: forall a. GenericHeytingAlgebra a => a -> a -> a
genericMul :: forall a rep. Generic a rep => GenericSemiring rep => a -> a -> a
A Generic
implementation of the mul
member from the Semiring
type class.
genericMul' :: forall a. GenericSemiring a => a -> a -> a
genericSub :: forall a rep. Generic a rep => GenericRing rep => a -> a -> a
A Generic
implementation of the sub
member from the Ring
type class.
genericSub' :: forall a. GenericRing a => a -> a -> a
implies :: forall a. HeytingAlgebra a => a -> a -> a
lcm :: forall a. Eq a => EuclideanRing a => a -> a -> a
The least common multiple of two values.
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.
max :: forall a. Ord a => a -> a -> a
Take the maximum of two values. If they are considered equal, the first argument is chosen.
min :: forall a. Ord a => a -> a -> a
Take the minimum of two values. If they are considered equal, the first argument is chosen.
mod :: forall a. EuclideanRing a => a -> a -> a
mul :: forall a. Semiring a => a -> a -> a
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.
sub :: forall a. Ring a => a -> a -> a