Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
13
Task/Anonymous-recursion/Elixir/anonymous-recursion.elixir
Normal file
13
Task/Anonymous-recursion/Elixir/anonymous-recursion.elixir
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
fib = fn f -> (
|
||||
fn x -> if x == 0, do: 0, else: (if x == 1, do: 1, else: f.(x - 1) + f.(x - 2)) end
|
||||
)
|
||||
end
|
||||
|
||||
y = fn x -> (
|
||||
fn f -> f.(f)
|
||||
end).(
|
||||
fn g -> x.(fn z ->(g.(g)).(z) end)
|
||||
end)
|
||||
end
|
||||
|
||||
IO.inspect y.(&(fib.(&1))).(40)
|
||||
Loading…
Add table
Add a link
Reference in a new issue