Skip to content

Instantly share code, notes, and snippets.

Created Feb 14, 2018
What would you like to do?
def function_name (f):
dict = {}
def inner_function(x):
if x not in dict:
dict[x] = f(x)
return dict[x]
return inner_function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment