Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn example(f: impl Fn()) {
- f();
- f();
- f();
- }
- fn main() {
- let s = String::new();
- example(move || {
- println!("{}", s);
- })
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement