Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- switch (x, y){
- // if x == Monday and y == Sunday
- Monday, Sunday => print("A")
- // if x == y == Tuesday
- Tuesday, Tuesday => print("B")
- }
- switch (x){
- // if it is a node with two leaf children
- Node(Leaf, Leaf) => Leaf
- }
- switch (x){
- // if x == Monday and some other condition met
- Monday | salary > 1000 => print("A")
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement