I have a `sealed class` with many `data class` es ...
# getting-started
y
I have a
sealed class
with many
data class
es that subclass it. I get these subclasses from some stream I want to build some sort of state machine that changes its state based on the last seen subclass. what’s a cheap/easy way to encode/decode the type of the seen class?