(or “Discriminated unions for dummies like me”, or “Tagged unions for the rest of us”)
Discriminated unions are one of those things in the lexicon of functional programming that can often sound baffling to “outsiders”; it’s almost up there with monads and currying. But in practice they’re simple and incredibly useful. I thought I’d try and show a concrete example of where they can be used in a way which is more powerful and robust than the equivalent OO approach.
Continue reading Beginning F#: Positive Discrimination