Is there a way to curry functions in rust?

=============
fn printn(n: int, f:fn@(i: int)) {
  let mut i = 0;
  while i < n {
    f(i)
  }
}

fn main() {
  let print10: fn@(i:int) = printn(10, _);  // does not compile
}
=============

-Amitava Shee
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to