Exploring monads by applying test-driven development