Created
October 21, 2015 23:39
-
-
Save mzemel/9f08621e75de888d4989 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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