A simple implementation of a Promise