Creating a Self-Referencing Cache for Recursive Functions
How would I go about making a cache that can reference itself? I have a recursive function that looks (in psuedocode) like this:
And during this recursion, there's going to be a ton of duplicate computations, so I'd like the recursive call to
And during this recursion, there's going to be a ton of duplicate computations, so I'd like the recursive call to
intensiveWork to also be cached