Skip to content

Instantly share code, notes, and snippets.

@mzemel
Created October 21, 2015 23:39
Show Gist options
  • Save mzemel/9f08621e75de888d4989 to your computer and use it in GitHub Desktop.
Save mzemel/9f08621e75de888d4989 to your computer and use it in GitHub Desktop.
defmodule Tracer do
defmacro def(definition, do: _content) do
IO.inspect definition
quote do: {}
end
end
defmodule Calculator do
import Kernel, except: [def: 2]
import Tracer, only: [def: 2]
def puts_sum_three(a, b, c), do: IO.puts a + b + c
end
Calculator.puts_sum_three(1, 2, 3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment