a swift Promise A+ implementation