Skip to content
loading...

re: Advent of Code 2019 Solution Megathread - Day 5: Sunny with a Chance of Asteroids VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Ok, as promised, here's the code I wanted to write, but I was halfway done before I saw it, and I wanted the answer so bad I didn't give myself the...
 

Definitely can say this implementation has a lot of class. 🤣

Yeah, I wish there was a more elegant way of doing discriminated unions in Kotlin. I'm used to the lightweight kinds/types of Haskell. Arrow-KT lets you do basic stuff pretty nicely, but it gets ugly the more you try to be full functional style only.

I'm also disappointed in the type erasure.

code of conduct - report abuse