I\'m trying to generalize some sort of isIntanceOf based on a sealed hierarchy, but haven\'t been successful. The example below demonstrates what I want to achieve:
isIntanceOf