Robinhood interview question

Write promise class from scratch