Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Church at work solution in Creative category for Funny Addition by nickie
from functools import reduce as r
c = lambda n: lambda s, z: r(lambda x, f: f(x), [z]+[s]*n)
u = lambda t: t(lambda x: x+1, 0)
p = lambda t, u: lambda s, z: t(s, u(s, z))
checkio = lambda l: u(r(p, map(c, l)))
if __name__ == '__main__':
assert checkio([5, 5]) == 10, 'First'
assert checkio([7,1]) == 8, 'Second'
print('All ok')
Feb. 3, 2014
Comments: