Implementation of Promise/A+