https://123dok.net/document/yr31gnx8-optimal-stopping-with-irregular-reward-functions.html