Hash :
10969336
Author :
Thomas de Grivel
Date :
2024-03-27T21:10:37
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 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
type(beaucoup)
beaucoup
def beaucoup = (U8) beaucoup
type(beaucoup)
beacoup
beaucoup
1 / 4
(Ratio) 1 / 4
(Ratio) 1 / 4 * 2
1/4 * 2
type(1/4)
1/4 / 13/12
1/4 / 13/12 * 2
(Complex) 1
1 +i 2
type(1 +i 2)
1 +i 2 +i 3
(1 +i 2) * (2 +i 3)
sqrt(-1)
sqrt(-1) * sqrt(-1)
sqrt(-2) * sqrt(-2)
def dt = macro (x) do
quote do
x = ^ unquote(x)
{x, x}
end
end
dt(200)
dt(200 * 200)
dt(sqrt(-1))
def double = fn (x) { x * 2 }
double(200)
double(beaucoup)
def beaucoup = 1 + 10000000000000000000000000000000000000000000
double(beaucoup)
dt
double(3/4)
1 / double(3/4)
a = b
a = 1
b = a
b = ^ a
b = a
a = ^ b
a = ^ c
a = ^ b
b = 1
a = ^ b
a = c
fib(10)
fib(20)
def fib = fn { (0) { 1 } (1) { 1 } (x) { if x < 0 then 1 else fib(x - 2) + fib(x - 1) end } }
def fib = fn (x) { if x < 0 then 1 else fib(x - 2) + fib(x - 1) end }
def fib = fn (x) { if x < 0 then
1
else
fib(x - 2) + fib(x - 1)
end
}
if true then 1 else 2 end
if true 1 else 2 end
def fib = fn (x) { if x < 0 1 else fib(x - 2) + fib(x - 1) end }
fib(-1)
def fib = fn (x) { if x < 0 0 else fib(x - 2) + fib(x - 1) end }
def fib = fn (x) { if x < 0 then 0 else fib(x - 2) + fib(x - 1) end }
def fib = fn { (0) { 1 } (1) { 1 } (x) { if x < 0 then 0 else fib(x - 2) + fib(x - 1) end }}
do end
end
do end
end
do end
defmodule Plop do end
quote Plop
quote_cfn Plop
(Sym) "Abc"
defmodule Plop do end
defmodule Plop do def a = 1 end
quote_cfn Plop
defmodule Plop do def a = 1 end
Plop.a
defmodule Plop do def a = 1 end
Plop.a
Plop
defmodule Plop do def a = 1 end
Plop.a
defmodule Plop do def a = 1 end
Plop.a
defmodule Plop do defoperator :operator_add :+ cfn Tag "tag_add" (Tag, Tag, Result) 10 :left end
defmodule Plop do defoperator :operator_add :+ cfn Tag "tag_mul" (Tag, Tag, Result) 10 :left end
defmodule Plop do
defoperator :operator_add :+ cfn Tag "tag_mul" (Tag, Tag, Result) 10 :left
def sq = fn (x) { x + x }
end
Plop.sq(4)
defmodule Plop do defoperator :operator_add :+ cfn Tag "tag_mul" (Tag, Tag, Result) 10 :left end
defmodule Plop do
def sq = fn (x) { x + x }
end
Plop.sq(4)