Yet another purely functional Promise Monad implementation