Skip to content

Instantly share code, notes, and snippets.

@leandrocp
Created May 17, 2018 11:31
Show Gist options
  • Save leandrocp/49af4d050e1f7e3913edfe89d571dc09 to your computer and use it in GitHub Desktop.
Save leandrocp/49af4d050e1f7e3913edfe89d571dc09 to your computer and use it in GitHub Desktop.
# import apex adef macro
import Apex.AwesomeDef
# change def to adef
adef test(data, options \\ []) do
data
end
# when you call your function, you'll receive detailed information about its execution
iex(1)> Apex.test "foo"
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Function Elixir.Apex.test was called
defined in /Users/bjoernrochel/Coding/Laboratory/apex/lib/apex.ex:12
----------------------------------------------------------------------------------------------------
Parameters:
----------------------------------------------------------------------------------------------------
[
[0] "foo"
[1] []
]
----------------------------------------------------------------------------------------------------
Result:
----------------------------------------------------------------------------------------------------
"foo"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment