SHARE
TWEET

Untitled

tinyevil Dec 18th, 2018 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. switch (x, y){
  2.     // if x == Monday and y == Sunday
  3.     Monday, Sunday => print("A")
  4.     // if x == y == Tuesday
  5.     Tuesday, Tuesday => print("B")
  6. }
  7.  
  8. switch (x){
  9.     // if it is a node with two leaf children
  10.     Node(Leaf, Leaf) => Leaf
  11. }
  12.  
  13. switch (x){
  14.     // if x == Monday and some other condition met
  15.     Monday | salary > 1000 => print("A")
  16. }
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