Function fp_rust::fp::compose_two [−][src]
pub fn compose_two<A, B, C, G, F>(
f: F,
g: G
) -> impl FnOnce(A) -> C where
F: FnOnce(A) -> B,
G: FnOnce(B) -> C,
Compose two functions into one.
Return f(g(x))
Arguments
f
- The givenFnOnce
.g
- The givenFnOnce
.
NOTE: Credit https://stackoverflow.com/questions/45786955/how-to-compose-functions-in-rust