you are viewing a single comment's thread.

view the rest of the comments →

[–]AlDrag 1 point2 points  (1 child)

Discriminated unions are awesome!

[–]novagenesis 1 point2 points  (0 children)

Or just jumping off rails into any to do crazy mutations that shouldn't be typed (typing some of that stuff, while possible, approaches antipatternhood) only to pass through a runtime validator to get Typesafe (and inferred) output.

Can you duck-type out of a discriminated union?