{"version":"1.0","type":"rich","title":"memoizedAdd","description":"This example visualizes function memoization by showing how repeated calls to `memoizedAdd` return cached results. It uses plain JavaScript to implement a `memo` wrapper that stores computed sums in a `cache` object, keyed by a stringified hash of the arguments. The code defines `addFn` for addition and then wraps it with `memoizedAdd`, demonstrating that subsequent calls with the same inputs bypass the original function. The visualization relies on standard JavaScript object property access and `Object.keys` to check cache hits, with no external libraries or rendering APIs involved.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-802166490ec38cff026b449e8f1cbd9c?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}