title: Call a function inside promise
body: <p>I'm trying to find a way to call the method pageLoader.fetch twice in this promise. I already tried to separate it in a new promise but I get undefined when I try to get the variable links[0]. How to do this?</p>
  
  <pre><code>pageLoader
    .fetch(url)
    .then(function(data) {
      links = html.orderdList(data);
    })
    .then(function() {
      return pageLoader.fetch(links[0]);
      //links[0] is undefined in the next line!?
    })
    .then(
      pageLoader
        .fetch(links[0])
        .then(function(innerLinks) {
          calLinks = html.unorderList(innerLinks);
        })
        .then(function() {
          return pageLoader.fetch("http:///example.com");
        })
        .catch(function(error) {
          console.log(error);
        })
    );
  </code></pre>