Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn curry (x: i64) -> impl Fn(i64) -> Box<Fn(i64) -> i64> {
- move |a: i64| { Box::new(move |b: i64| x + a + b) }
- }
- fn main() {
- println!("{}", curry(3)(4)(5));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement