I have a structure:
my_struct = %MyStruct{a: 1, b: 2}
how to make it enumerable so i can use methods Enumon it?
Enum
You can use Map.to_list(struct)instead Enum.to_list, since structures are just cards with a key __struct__.
Map.to_list(struct)
Enum.to_list
__struct__
Source: https://habr.com/ru/post/1540739/More articles:Python error Pymongo - pythonPython script gets stuck trying to continue process in lldb - pythonIs there a way to never have a scrollbar on a div? - htmlUsing Regex to Replace a String in Delphi - regexPostgres returns records in the wrong order - indexingIs it possible to configure Crashlytics on iOS without installing the application on each developer's workstation? - iosOsgi eclipse: how to export a package from a package of fragments and make them visible to an external package? - javaiOS Aspect Fill Image Resizing with content matching left / top - iosWhat will happen to the synchronized block in the thread that is inside the synchronized method? - javaIntersection of two range arrays - arraysAll Articles