A promises library in swift