mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 14:37:49 +00:00
Issue #137. Docs for memoize.
This commit is contained in:
@@ -676,7 +676,9 @@ jQuery('#underscore_button').bind('click', buttonView.onClick);
|
||||
Memoizes a given <b>function</b> by caching the computed result. Useful
|
||||
for speeding up slow-running computations. If passed an optional
|
||||
<b>hashFunction</b>, it will be used to compute the hash key for storing
|
||||
the result, based on the arguments to the original function.
|
||||
the result, based on the arguments to the original function. The default
|
||||
<b>hashFunction</b> just uses the first argument to the memoized function
|
||||
as the key.
|
||||
</p>
|
||||
<pre>
|
||||
var fibonacci = function(n) {
|
||||
|
||||
Reference in New Issue
Block a user