SHARE
TWEET

Untitled

a guest Jul 23rd, 2019 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fn curry (x: i64) -> impl Fn(i64) -> Box<Fn(i64) -> i64> {
  2.     move |a: i64| { Box::new(move |b: i64| x + a + b) }
  3. }
  4.  
  5. fn main() {
  6.     println!("{}", curry(3)(4)(5));
  7. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top