Re:Idiomatic Monads in Rust
by masklinn on Thursday April 04, 2019 @11:26AM
(#19573418)
> Does the order of defining arguments matters or its just a taste of matter?
It's only a matter of taste or convenience. Haskell is a curried language, so you put the callback first to help partial application, and reversing the order is just a `flip` away.
Rust is uncurried and uses a C-style syntax, so you generally put lambdas in tail position, for a more block-y usage:
It's only a matter of taste or convenience. Haskell is a curried language, so you put the callback first to help partial application, and reversing the order is just a `flip` away.
Rust is uncurried and uses a C-style syntax, so you generally put lambdas in tail position, for a more block-y usage: