title: return value inside promise chain isn't getting called
body: <p>I'm using the promise library Bluebird and I'm currently running into the issue that everything inside the function runs great, but when I try to return a value, the function instead returns <code>undefined</code>.</p>
  
  <p>This is the promise chain:</p>
  
  <pre><code>function foo() {
      createGroupMembers(parsedChat).then(function(val) {
          var members = val;
  
          createMessages(parsedChat, maxPages).then(function(val) {
              var messages = val;
  
              Promise.all([ createFrontCover(subject, firstdateOfMessages, lastDateOfMessages, isPreview), createStats(parsedChat), createBackCover(parsedChat)])
              .then(function (results) {
                  var front = results[0];
                  var stats = results[1];
                  var backcover = results[2];
  
                  var book = head + front + stats + members + messages + backcover;
  
                  console.log('pages in this book: ', pages);
                  console.log(book); // logs perfect values.
  
                  return book; 
              }); 
  
         });
  
      });
  }
  </code></pre>
  
  <p>The problem is simple: when calling <code>foo()</code>, it's value becomes <code>undefined</code> instead of book. Why am I experiencing this behaviour?</p>