We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I use pipe in another language I don't want it to compile immediately, just want to create a new function. Ex:
fn add1(a: usize) -> usize { a + 1 } fn multiple(a: usize) -> usize { a * 2 }
Now I want a new function that will add1 first then multiple. Is there any way we can do it like this let newFunc = add1.pipe(multiple)
let newFunc = add1.pipe(multiple)
The text was updated successfully, but these errors were encountered:
Do you have any problem with closure?
let new_func = |a: usize| a.pipe(add1).pipe(multiple);
Sorry, something went wrong.
Hey, that's a good one. I come from another language with a different approach. This is cool. Thanks
No branches or pull requests
When I use pipe in another language I don't want it to compile immediately, just want to create a new function. Ex:
Now I want a new function that will add1 first then multiple. Is there any way we can do it like this
let newFunc = add1.pipe(multiple)
The text was updated successfully, but these errors were encountered: