title: Why Underscore.js chain() method is not lazy?
body: <p>According to Underscore.JS sources (<a href="https://github.com/jashkenas/underscore/blob/master/underscore.js">https://github.com/jashkenas/underscore/blob/master/underscore.js</a>):</p>
  
  <pre><code>// Start chaining a wrapped Underscore object.
  chain: function() {
    this._chain = true;
    return this;
  },
  
  // Extracts the result from a wrapped and chained object.
  value: function() {
    return this._wrapped;
  }
  </code></pre>
  
  <p>chain() and value() functions are just simple wrappers for Underscore object.</p>
  
  <p>So if I'm using following construction:</p>
  
  <pre><code>_.chain(someCollection)
  .map(function1)   
  .map(function2)
  .map(function3)
  .value()
  </code></pre>
  
  <p>Underscore will create two intermediate collections and will perform three enumerations.</p>
  
  <p>Why the chain() and value() methods are not implemented as lazy evaluated like LINQ implements its methods? For example, this chain could be treated as:</p>
  
  <pre><code>_.chain(someCollection)
  .map(function(x){
      return function3(function2(function1(x)));
  })
  .value();
  </code></pre>
  
  <p>Is there any JS related issues for this kind of implementation?</p>