| 1 |
defmodule HelloModule do |
| 2 |
@moduledoc """ |
| 3 |
This is supposed to be `markdown`. |
| 4 |
__Yes__ this is [mark](http://down.format) |
| 5 |
|
| 6 |
# Truly |
| 7 |
|
| 8 |
## marked |
| 9 |
|
| 10 |
* with lists |
| 11 |
* more |
| 12 |
* and more |
| 13 |
|
| 14 |
Even.with(code) |
| 15 |
blocks |> with |> samples |
| 16 |
|
| 17 |
_Docs are first class citizens in Elixir_ (Jose Valim) |
| 18 |
""" |
| 19 |
|
| 20 |
# A "Hello world" function |
| 21 |
def some_fun do |
| 22 |
IO.puts "Juhu Kinners!" |
| 23 |
end |
| 24 |
# A private function |
| 25 |
defp priv do |
| 26 |
is_regex ~r""" |
| 27 |
This is a regex |
| 28 |
spanning several |
| 29 |
lines. |
| 30 |
""" |
| 31 |
x = elem({ :a, :b, :c }, 0) #=> :a |
| 32 |
end |
| 33 |
end |
| 34 |
|
| 35 |
test_fun = fn(x) -> |
| 36 |
cond do |
| 37 |
x > 10 -> |
| 38 |
:greater_than_ten |
| 39 |
true -> |
| 40 |
:maybe_ten |
| 41 |
end |
| 42 |
end |