https://kotlinlang.org logo
a

adam-mcneilly

11/29/2017, 2:55 PM
You can do cool stuff like this with sealed classes IIRC. I saw a blog post, will dig for it unless someone else knows of it already.