Port over from domenic/promises-unwrapping.

Specifically, from https://github.com/domenic/promises-unwrapping/blob/a3a8a88c9091a009be7d2320cf0e590317db5956/docs/writing-specifications-with-promises.md

Closes #1