memoizeWithLimit
Creates a size-limited memoized version of the receiver function.
Return
A function that caches results for previously used inputs, with a size limit.
Parameters
T
The input type for the function.
R
The output type of the function.
maxSize
The maximum number of entries to keep in the cache.