daily pastebin goal
25%
SHARE
TWEET

Untitled

a guest Jan 12th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fn make_closure<'a, T>(val: T) -> impl Fn() -> &'a T + 'a
  2. {
  3.     move || &val
  4. }
  5. fn main()
  6. {
  7.     let f = make_closure(42);
  8.     println!("{}", f())
  9. }
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