How to define Macro for a new Type?

Elixir doesn’t really have type dispatch though as it has no static type system, so I’m unsure what any kind of NewType could accomplish with this short of just {:mytype, values} or so as the purpose of NewType’s are to specify a unique set of functionality while hiding the original functionality of a specific type.

2 Likes