I want to create an Elixir macro that converts a list of atoms [:a, :b] to vars a, b. The value of a and b can be anything -- all that I want to achieve is creating a variable with the readable name of the atom passed in. Is this possible? If so, how?
This can be done using Macro.var/1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With