Lab49 interview question

write a higher order function for memoization.