8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a8dc3f commit 9b79897Copy full SHA for 9b79897
src/main/scala/eu/sim642/adventofcode2018/Day5.scala
@@ -2,10 +2,7 @@ package eu.sim642.adventofcode2018
2
3
object Day5 {
4
5
- def opposites(a: Char, b: Char): Boolean = (a.isLower, b.isLower) match {
6
- case (true, false) | (false, true) => a.toLower == b.toLower
7
- case _ => false
8
- }
+ def opposites(a: Char, b: Char): Boolean = a != b && a.toLower == b.toLower
9
10
def reactPolymer(s: String): String = {
11
/*def helper(init: List[Char], tail: List[Char]): List[Char] = (init, tail) match {
0 commit comments