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