memorize the results of a multi-parameter function, using a weak cache.

the used arguments are cached weakly, meaning that if a non-primitive object obj was used as an argument, then obj is not strongly bound to the memorized function's cache, meaning that if obj becomes inaccessible in all scopes, then obj will become garbage collectible, which will then also clear the cache's reference to obj (and its memorized result).