Is there any idiomatic and compile-time safe way to use sealed classes in a flow? I want to have an input, split it into separate flows and then join them together. Right now I’m thinking of something like in the attached code snippet but the problem is that it does not leverage that
Foo
is a sealed class at all, and I struggle to find a way that would do that.