3 ms·
"To do this with a sum type you'd have to have a common super type of string and nil and no other types." This seems wrong. You can make a new type that simpl
by dllthomas 12y ago
"To do this with a sum type you'd have to have a common super type of string and nil and no other types."
This seems wrong. You can make a new type that simply contains one of those, right?
In a sense that's what you're doing with a sum type in Haskell, though there you get to produce new types automatically from higher kinded types.