Given the atom atom of a module, how can I create a structure for this module?

I want to go from to MyModin %MyMod{}order to maintain backward compatibility with the older configuration format in the library I'm creating.

The module is already defined and calls the macro defstruct.

+4
source share
1 answer

The following should work fine:

struct(MyMod)   # => %MyMod{}
+7
source

Source: https://habr.com/ru/post/1626691/


All Articles