-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathmix.exs
52 lines (41 loc) · 1.03 KB
/
mix.exs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
defmodule Mdef.Mixfile do
use Mix.Project
def project do
[
app: :multidef,
version: "0.2.1",
elixir: "~> 1.0",
deps: [],
description: description,
package: package,
]
end
def application do
[applications: []]
end
defp description do
"""
Lets you define multiple heads for the same function:
defmodule Test do
import MultiDef
mdef fred do
{ :init, val } -> fred {:double, val}
{ :double, val } -> IO.puts(val*2)
a, b -> a+b
end
end
IO.inspect Test.fred 1, 2 #=> 3
IO.inspect Test.fred { :init, 4 } #=> 8
"""
end
defp package do
[
files: [ "lib", "priv", "mix.exs", "README.md" ],
contributors: [ "Dave Thomas <dave@pragprog.org>"],
licenses: [ "Same as Elixir" ],
links: %{
"GitHub" => "https://github.com/pragdave/mdef",
}
]
end
end