2 ms·The elegant way to do this is via coproducts and products.by wbl 7y agoThe elegant way to do this is via coproducts and products.