Permalink
Browse files

updating index to reflect optimized memoizer, minor formatting fix

  • Loading branch information...
1 parent cf84673 commit 1e1632725464c8e69ade3f125ea21fdb2e70b953 @addyosmani committed Oct 9, 2011
Showing with 5 additions and 9 deletions.
  1. +5 −8 index.html
  2. +0 −1 underscore.js
View
13 index.html
@@ -707,14 +707,11 @@ <h2 id="styles">Object-Oriented and Functional Styles</h2>
</pre>
<p id="memoize">
- <b class="header">memoize</b><code>_.memoize(function, [hashFunction])</code>
- <br />
- 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 default
- <b>hashFunction</b> just uses the first argument to the memoized function
- as the key.
+ <b class="header">memoize</b><code>_.memoize(function)</code>
+ <br />
+ Memoizes a given <b>function</b> by caching computed results to avoid
+ computation being repeated. Useful for speeding up slow-running computations,
+ in particular those with a recursive aspect.
</p>
<pre>
var fibonacci = function(n) {
View
1 underscore.js
@@ -465,7 +465,6 @@
};
};
-
// Delays a function for the given number of milliseconds, and then calls
// it with the arguments supplied.
_.delay = function(func, wait) {

0 comments on commit 1e16327

Please sign in to comment.