SHARE
TWEET

Untitled

a guest Feb 20th, 2019 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fn foo(a: i32) -> i32 {
  2.    
  3.     let foo = match a {
  4.         x if x % 2 == 0 => return 0,
  5.         x => x + 1,
  6.     };
  7.    
  8.     foo
  9. }
  10.  
  11. fn main() {
  12.     println!("foo: {}, {}", foo(42), foo(43))
  13. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top