 #       { FileInfo, Orddict.fetch(opts, :atime, nil), Orddict.fetch(opts, :mtime, nil) }
 #     end
 #
-def initializers(name, values) do
+defmacro initializers(name, values) do
   # Get default values from the dictionary.
   defaults  = Orddict.values(values)
 


# Main entry point for records definition.
defmacro define(_parent, name, values) do
  functions = getters_and_setters(values, 1, [])
  functions = [initializers(name, values)|functions]

  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: unquote(functions)
  end
end

private

# Define initializers methods. For a declaration like:
#

  getters_and_setters(t, i, [contents|acc])
end

defmacro getters_and_setters([], _i, acc), do: acc