fp_library/
functions.rs

1//! Generic, free helper functions, combinators and typeclass functions that
2//! dispatch to instance methods.
3
4pub use super::typeclasses::{
5	bind::bind, empty::empty, functor::map, pure::pure, sequence::sequence,
6};
7
8/// Returns its input.
9///
10/// Examples
11///
12/// ```rust
13/// use fp_library::{functions::identity};
14/// assert_eq!(identity(()), ());
15/// ```
16pub fn identity<A>(a: A) -> A {
17	a
18}