daily pastebin goal
14%
SHARE
TWEET

Untitled

a guest Jun 21st, 2018 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fn main() {
  2.     let closure = || println!("Hello World");
  3.     let boxed_referenced_fn = Box::new(&closure);
  4.     execute(boxed_referenced_fn);
  5. }
  6.  
  7. fn execute(f: Box<&Fn()>) { (f)() }
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