Advertisement
tinyevil

Untitled

Dec 18th, 2018
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement