Write a memoized function, given a function as a parameter.
Utilisateur anonyme
This was more difficult as I had a very hazy idea of memoized functions. They had to walk me through some concepts, but once I understood them, I used a map to store previous results. I would check that map when the function got called. If a value existed for a key, I returned it, otherwise, I computed, stored, and then returned the value.