It can be type safe and testable with free monads