Nov. 26, 2023, 6:42 p.m. | Stefan Alfbo

DEV Community dev.to

Discriminated unions are a powerful data structure to use when modelling a domain in an application.


The name of this data type varies between programming languages, for instance:



Pattern matching and discriminated unions are great together and makes it really easy to express complex models in the code.


Here is a simple …

100daystooffload application data datastructures domain instance languages modelling ocaml programming programming languages type types typescript union unions variants

Lead Developer (AI)

@ Cere Network | San Francisco, US

Research Engineer

@ Allora Labs | Remote

Ecosystem Manager

@ Allora Labs | Remote

Founding AI Engineer, Agents

@ Occam AI | New York

AI Engineer Intern, Agents

@ Occam AI | US

AI Research Scientist

@ Vara | Berlin, Germany and Remote