Expand description
A library for functional programming in Rust
Modules
Applicative functor.
Allows application of a function in an Applicative context to a value in an Applicative context.
Apply.
Combinators
Contravariant functors.
FlatMap.
Functor. The name is short for “covariant functor”.
Implementation of Higher Kinded Types for Rust.
Invariant functors.
Monad.
Convenience re-export of common members of the library.
Semigroupal.
Macros
Compose functions.
The constant with no arguments constant(x) = () -> x.
The constant function constant1(x) = _ -> x also known as K (Kestrel) combinator.
The constant function with two arguments constant2(x) = (_, _) -> x.
The constant function with 3 arguments constant3(x) = (_, _, _) -> x.
The constant function with 4 arguments constant4(x) = (_, _, _, _) -> x.
The constant function with 5 arguments constant5(x) = (_, _, _, _, _) -> x.
The constant function with 6 arguments constant6(x) = (_, _, _, _, _, _) -> x.
The constant function with 7 arguments constant7(x) = (_, _, _, _, _, _, _) -> x.
The constant function with 8 arguments constant8(x) = (_, _, _, _, _, _, _, _) -> x.
The constant function with 9 arguments constant9(x) = (_, _, _, _, _, _, _, _, _) -> x.
Curry a function of two arguments. The first argument is applied to the function. The second
argument is returned as a closure. The returned closure can be applied to the second argument.
The result is the same as applying the function to both arguments.
Curry a function of 3 arguments.
Curry a function of 4 arguments.
Curry a function of 5 arguments.
Curry a function of 6 arguments.
Curry a function of 7 arguments.
Curry a function of 8 arguments.
Curry a function of 9 arguments.
Flip arguments of a function flip(f)(x, y) = f(y, x) also known as C (Cardinal) combinator.
Macro implementing
Higher for a given type of kind * -> *.Macro to implement Invariant for types implementing [Contravariant].
Pipe functions.
Macro to implement Semigroupal for types with Iterator support.