diff --git a/src/main/kotlin/no/rodland/advent_2023/Day09.kt b/src/main/kotlin/no/rodland/advent_2023/Day09.kt index 73432699..227812dd 100644 --- a/src/main/kotlin/no/rodland/advent_2023/Day09.kt +++ b/src/main/kotlin/no/rodland/advent_2023/Day09.kt @@ -21,7 +21,7 @@ class Day09(val input: List) : Day>> { else last() + zipWithNext { a, b -> b - a }.next() // private fun List.previous(): Int = if (all { it == 0 }) 0 -// else first() - diffs().previous() +// else first() - zipWithNext { a, b -> b - a }.previous() override fun List.parse(): List> { return map { line ->