18 lines
226 B
Elixir
18 lines
226 B
Elixir
|
defmodule Test do
|
||
|
|
||
|
defmacro createfuncBase(name) do
|
||
|
quote do
|
||
|
def unquote(name)(true), do: true
|
||
|
end
|
||
|
end
|
||
|
|
||
|
end
|
||
|
|
||
|
defmodule Test2 do
|
||
|
require Test
|
||
|
|
||
|
def test(), do: false
|
||
|
|
||
|
Test.createfuncBase(:test)
|
||
|
end
|