Guest User

Untitled

a guest
Jan 23rd, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. fn foo(bar: for<'a> Fn(&'a str) -> (impl (Fn() -> String) + 'a)) -> String {
  2. let baz = "hello".to_owned();
  3. bar(&baz)()
  4. }
  5.  
  6. fn main() {
  7. println!("{}", foo(|qux| move || qux.to_owned() + " world"));
  8. }
Add Comment
Please, Sign In to add comment