Always, always test

So after some more work today I concluded that the code for a backtracking state monad yesterday does not work as hoped. Mostly because the exception handling scopes don't work they way I thought when I was squinting at them yesterday.

Fortunately, I was able to save the day with callcc. However, locally defined exceptions were still necessary to hide the return type when actually running the monad. I want to clean parts of it up a little more before I post the new and improved and hopefully bug free version.

Of course, I could ask why all of you out there didn't run off and try my code and tell me how wrong I was 🙂

Leave a Comment