Problem 2630 · Hard

Memoize II

Wrap any function so it never runs twice for the same arguments. Arguments count as the same only when they are === to each other, so two separate objects with equal contents are different inputs.

Open the interactive visualisation