https://kotlinlang.org logo
#advent-of-code
Title
# advent-of-code
j

Joris PZ

12/03/2019, 4:07 PM
Yeah, I managed to reuse my
Position
and
Heading
classes from last year after some dusting off. My solution: https://github.com/jorispz/aoc-2019/blob/master/src/commonMain/kotlin/day3/p03.kt I started using a fancy Sequence-based solution until I realized that I needed the whole history of visited points anyway, so dropped that and just went for creating a ListPosition per wire and find the crossing points as above.
k

Kroppeb

12/03/2019, 6:49 PM
I had made a list of functions I wanted to make for my utils library and
scan
was actually one of them. Sadly I focused on some other functions first and therefor couldn't use it =/
s

stkent

12/04/2019, 2:24 AM
+1 excited for scan to be added so I can drop custom impls 😄
6 Views