| all/1 | Compose a bunch of predicates using logical conjunction. |
| any/1 | Compose a bunch of predicates using logical disjunction. |
| compose/1 | Compose many functions. |
| compose/2 | Compose 2 functions. |
| negate/1 | Logical negation for a predicate. |
| sequence/2 | Given a list of functions and an input, return a list where each element represents the output of running the matching function on the input. |
all(Fs::[fun((A) -> boolean())]) -> fun((A) -> boolean())
Compose a bunch of predicates using logical conjunction.
For any givenX, the resulting function will return true if and
only if all of the specified functions would return true for that
same input. Beware vacuous truths: if the list of predicates is
empty, "all" predicates return true.
any(Fs::[fun((A) -> boolean())]) -> fun((A) -> boolean())
Compose a bunch of predicates using logical disjunction.
For any givenX, the resulting function will return true if at
least one of the specified predicates would return true.
compose(Fs::[Fun]) -> Fun
Compose many functions.
Given inputs[F1, F2, ..., Fn], returns F1 ∘ F2 ∘
... ∘ Fn. Note that function composition is associative,
but not commutative. As such, keep in mind that functions are
executed last to first.
compose(F::fun((A) -> B), G::fun((B) -> C)) -> fun((A) -> C)
Compose 2 functions.
Given functions F and G, returns a F ∘ G.
F = fun (X) -> X * 2 end,
G = fun (X) -> X + 1 end,
H1 = compose(F, G),
H2 = compose(G, F),
10 = H1(4),
9 = H2(4).
negate(F::fun((A) -> boolean())) -> fun((A) -> boolean())
Logical negation for a predicate.
sequence(Fs::[Fun], A) -> [B]
Given a list of functions and an input, return a list where each element represents the output of running the matching function on the input.
Generated by EDoc