Family Day update
This commit is contained in:
parent
aac6731f2c
commit
9ad63ea473
2442 changed files with 39761 additions and 8255 deletions
3
Task/Anonymous-recursion/Python/anonymous-recursion-6.py
Normal file
3
Task/Anonymous-recursion/Python/anonymous-recursion-6.py
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
>>> fib_func = (lambda f: lambda n: f(f,n))(lambda f, n: None if n < 0 else (0 if n == 0 else (1 if n == 1 else f(f,n-1) + f(f,n-2))))
|
||||
>>> [ fib_func(i) for i in range(-2, 10) ]
|
||||
[None, None, 0, 1, 1, 2, 3, 5, 8, 13, 21, 34]
|
||||
Loading…
Add table
Add a link
Reference in a new issue