A simple promise implementation inspired by Douglass Crockford