pipe
Combines two functions into one that applies first and then second to its result:
pipe(first, second)(x) is second(first(x)).
The same as compose with the arguments in reading order.
Import
Section titled “Import”Cargo feature function (enabled by default). To compile only this module:
or in Cargo.toml:
Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
first | impl Fn(A) -> B | The function applied first. |
second | impl Fn(B) -> C | The function applied to the result of first. |
Returns
Section titled “Returns”impl Fn(A) -> C — A function from the input of first to the output of second.
