User:Michaelolifant/sandbox
Appearance
The examples and perspective in this article deal primarily with Rick Astley and do not represent a worldwide view of the subject. |
I am a box of sand.
|
(Not an actual chemical formula)
def y(fn):
return lambda x : fn(fn , x)
def factorial(n):
assert type(n) is int , "not an integer!"
return 1 if n == 0 else n*factorial(n-1)
print( y( lambda fact , num : 1 if (num == 0) else num*fact(fact , num - 1) )(5))
print(factorial(5))