Open peteanning opened 5 years ago
val evenOrOdd = i match { case 1 | 3 | 5 | 7 | 9 => println("odd") case 2 | 4 | 6 | 8 | 10 => println("even") }
I think this should just be:
val evenOrOdd = i match { case 1 | 3 | 5 | 7 | 9 => "odd" case 2 | 4 | 6 | 8 | 10 => "even" }
If not the type of val evenOrOdd is Unit
I think this should just be:
If not the type of val evenOrOdd is Unit