   getters_and_setters(t, i, [contents|acc])
 end
 
-def getters_and_setters([], _i, acc), do: acc+defmacro getters_and_setters([], _i, acc), do: acc
# syntax as `unquote(key)(record)` wouldn't be valid (as Elixir
# allows you to parenthesis just on specific cases as `foo()`
# and `foo.bar()`)
def getters_and_setters([{ key, _ }|t], i, acc) do
  i = i + 1

  contents = quote do


# Main entry point for records definition.
defmacro define(_parent, name, values) do
  quote do
    # Use `module NAME, do: CONTENTS` syntax which is
    # the same as `module NAME do CONTENTS end`. We need
    # to wrap this in a block so this module declaration
    # do not affect the outer module one.
    module unquote(name) do
      Record.getters_and_setters(unquote(values), 1, [])
      Record.initializers(__MODULE__, unquote(values))
    end
  end
end

# Define initializers methods. For a declaration like:
#
