Skip to content

Commit

Permalink
Issue jashkenas#137. Docs for memoize.
Browse files Browse the repository at this point in the history
  • Loading branch information
jashkenas committed Mar 20, 2011
1 parent 866cd35 commit d71f480
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.html
Expand Up @@ -676,7 +676,9 @@ <h2>Function (uh, ahem) Functions</h2>
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) {
Expand Down

0 comments on commit d71f480

Please sign in to comment.