Crate curri

Source

Macros§

apply
assoc
compose
curry
impl_compose

Traits§

Curry

Functions§

all
[a -> bool] -> (a -> bool) Returns true if all the predicates are satisfied by the given value, false otherwise.
always
a -> (* -> a) Returns a function that always returns the given value.
any
[a -> bool] -> (a -> bool) Returns true if any of the predicates are satisfied by the given value, false otherwise.
compose_vec
cond
[(a -> bool, a -> b)] -> (a -> Option) Returns the first value that satisfies the predicate, None otherwise.
f
(*) -> false Returns false.
f_ref
(&*) -> false Returns false.
find
((a -> bool), (a -> b)) -> ([a] -> Option b) Returns the first value that satisfies the predicate, None otherwise.
identity
(*) -> * Returns the given value.
if_else
([a -> bool], (a -> b), (a -> b)) -> (a -> b) Returns the result of the if_fn if the check is true, else the result of the else_fn.
map
[a -> b] -> ([a] -> [b]) Returns a new list containing the results of applying the function to each element of the list.
reduce
[(a, b) -> a] -> (a, [b]) -> a Returns the result of applying the function to each element of the list.
t
(*) -> true Returns true.
t_ref
(&*) -> true Returns true.