3 ms·
Well the syntax for declaring a function in Rust is: fn foo_bar(foo: &[MyType], bar: i32) -> String { ... } so probably to match that. I believe Haskell
by nicoburns 4y ago
Well the syntax for declaring a function in Rust is:
fn foo_bar(foo: &[MyType], bar: i32) -> String { ... }
so probably to match that.
I believe Haskell does something clever such that there is no difference between a function that takes two parameters, and a function that takes one parameter and returns a function that takes the second parameter. This isn't the case in Rust. Those would be distinct types and the latter would be called differently to the former. So I'm not sure that the Haskell syntax would work for Rust.