Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn main() {
- let x = |y: Box<Fn()>| {
- for _ in 0..10 {
- y();
- }
- };
- let z = Box::new(|| {
- println!("hi goose");
- });
- x(z);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement