Cache result of a function. Same arguments have to always return the same result in order to get expected optimization!
const square = memoize((value) => value * value)`square(2) // == 2 Copy
const square = memoize((value) => value * value)`square(2) // == 2
Cache result of a function. Same arguments have to always return the same result in order to get expected optimization!