Advertisement
Guest User

Untitled

a guest
Oct 13th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.15 KB | None | 0 0
  1. fn example(f: impl Fn()) {
  2. f();
  3. f();
  4. f();
  5. }
  6.  
  7. fn main() {
  8. let s = String::new();
  9. example(move || {
  10. println!("{}", s);
  11. })
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement