Advertisement
Guest User

Untitled

a guest
Apr 20th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.15 KB | None | 0 0
  1. fn pippo<F>(a: Option<F>)
  2. where F: Fn() -> bool {
  3. if let Some(f) = a {
  4. println!("{:?}", f());
  5. }
  6. }
  7.  
  8. fn main() {
  9. pippo(None);
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement