Nice!
Structs are product types. I wonder in what way we could simulate Sum types in Elixir. What I can think of so far is to ‘emulate’ them by having a struct where one of the keys is only ever one of a small subset of allowed atoms.
Nice!
Structs are product types. I wonder in what way we could simulate Sum types in Elixir. What I can think of so far is to ‘emulate’ them by having a struct where one of the keys is only ever one of a small subset of allowed atoms.