defmoduleGreetifydodefmacro__using__(_)doquotedoModule.register_attribute__MODULE__,:greets,accumulate:true,persist:false@before_compileGreetifyimportGreetify,only:[greet:2]endenddefmacrogreet(name,age)doquotedo@greets{unquote(name),unquote(age)}endenddefmacro__before_compile__(env)dogreetings=Module.get_attribute(env.module,:greets)for{name,age}<-greetingsdoIO.puts"#{name} is #{age} years old"endendenddefmoduleHumandouseGreetifygreet"Jon",21greet"Sam",23end