Catalan numbers: Difference between revisions

(→‎{{header|AutoHotkey}}: AutoHotkey example added)
Line 1,600:
 
def memoize(func):
func.__cachecache = {}
def memoized(key):
# Returned, new, memoized version of decorated function
cache = func.__cache
if key in cache:
return cache[key]
Line 1,635 ⟶ 1,634:
fmt = '%-10s %-10s %-10s'
print ((fmt % tuple(c.__name__ for c in defs)).upper())
print (fmt % tuple([('='*10],)*3))
for r in zip(*results):
print (fmt % r)
Anonymous user