SHARE
TWEET

Untitled

a guest Aug 22nd, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fn main() {
  2.     let x = |y: Box<Fn()>| {
  3.         for _ in 0..10 {
  4.             y();
  5.         }
  6.     };
  7.    
  8.     let z = Box::new(|| {
  9.         println!("hi goose");
  10.     });
  11.    
  12.     x(z);
  13. }
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
 
Top