morphic-ts icon indicating copy to clipboard operation
morphic-ts copied to clipboard

[Question] How can I define an empty for each type of the ADT

Open AlexandreRoba opened this issue 1 year ago • 1 comments

Hi, First thanks for the library. It is very cool. I have a question. Is there a way to loop on each element of the ADT and define an empty element? I started with:

Object.keys(adt.keys).map((t)=>....)

But then I need to pattern match on a string/key, not on an element of the ADT. Any help appreciated.

AlexandreRoba avatar Jun 18 '23 07:06 AlexandreRoba