Question: In this task, we write a function build_mem that takes an input function and returns a function that is the memoized version of the input

In this task, we write a function build_mem that takes an input function and returns a function that is the memoized version of the input function. That is (build_mem fib) should return a function behaving the same as fib_mem. For simplicity, you can assume the input function takes exactly one parameter. As before, the returned function should display the message "memoization hit" when given an input that is already in the association list. In this task, we write a function build_mem that takes an input function and returns a function that is the memoized version of the input function. That is (build_mem fib) should return a function behaving the same as fib_mem. For simplicity, you can assume the input function takes exactly one parameter. As before, the returned function should display the message "memoization hit" when given an input that is already in the association list
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
