A simple Promises implementation in Swift