Lambdant standard library.
$ yarn add stdlm
@std = require 'stdlm';
$ yarn test
Number -> Number -> Number
adds two Numbers
Number -> Number -> Number
subtracts two Numbers
Number -> Number -> Number
multiplies two Numbers
Number -> Number -> Number
divides two Numbers
Boolean -> Boolean
computes logical NOT
Boolean -> Boolean -> Boolean
computes logical OR
Boolean -> Boolean -> Boolean
computes logical AND
Number -> Number
computes bitwise NOT
Number -> Number
computes bitwise OR
Number -> Number
computes bitwise AND
Number -> Number -> Number
computes modulus
Number -> Number -> Number
computes left shift
Number -> Number -> Number
computes right shift
a -> b -> Boolean
determines reference or strict primitive equality (basic, least expensive)
a -> b -> Boolean
determines basic or Date/NaN/RegExp equality (similar)
a -> b -> Boolean
determines similar or recursive Object/Array equality (deep, most expensive)
a -> b -> Number
computes bitwise XOR
(a -> b) -> [a] -> [b]
maps a function over an array
(a -> Boolean) -> [a] -> [a]
filters an array by predicate
(a -> b) -> a -> [b] -> [a]
reduce from the left with a function and an initial value over an array
(a -> b) -> a -> [b] -> [a]
reduce from the right with a function and an initial value over an array
(a -> a) -> [a] -> [a]
reduce from the left with a function over an array, starting with the leftmost value
(a -> a) -> [a] -> [a]
reduce from the right with a function over an array, starting with the rightmost value
(Appendable a) => [a] -> a
takes the sum of all Appendables in the array
Number a => [a] -> a
takes the product of all Numbers in the array
{ IO } a -> a
prints the argument and returns it
a => a
I-combinator. returns the argument
(a -> b) -> a -> b
A-combinator. calls the first argument with the second
(b -> c) -> (a -> b) -> (a -> c)
B-combinator. composes two functions
a -> b -> a
K-combinator. thunkifies the first argument
(b -> a -> c) -> (a -> b -> c)
C-combinator. swaps the first two arguments
(a -> b -> c) -> (a -> b) -> a -> c
S-combinator. creates an applicative sequence
(a -> a -> b) -> a -> b
W-combinator. calls the first argument with the second argument twice
(b -> b -> c) -> (a -> b) -> a -> c
Psi-combinator. composes the first function over the second function for two arguments
((a, b) -> c) -> a -> b -> c
curries a function for two arguments
...
((a, b, c, d, e) -> f) -> a -> b -> c -> d -> e -> f
curries a function for five arguments
(a -> b -> c) -> (a, b) -> c
uncurries a function for two arguments
...
(a -> b -> c -> d -> e -> f) -> (a, b, c, d, e) -> f
curries a function for five arguments
(Constructor From a To c) => a -> [b] -> c
instantiates the first argument with the second argument as the parameters