Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn main() {
- let x: i32 = 22;
- closurefunc(|| x + 100);
- }
- fn closurefunc(f: impl Fn() -> i32) {
- println!("{:?}", f());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement