by Durgasoft · 6y ago · 0 comments
For example:
type answer = | Yes | No | Maybe
The type is 'answer'. The constructors are Yes, No, and Maybe (these are actually called type variants but now we're getting into jargon). I presume an 'abstraction over type constructors' means you want to generalize that type, so you can use the constructors to produce an abstract type that works with any type but I've never heard that specific term.In most languages, however, that's not a construct you can do much of anything with.