Adding a naive promises/A+ implementation.