Fun with Optional Typing: cheap mocking
For unit tests, it’s handy to mock out side-effecting functions so they don’t slow down tests.[1] Clojure has an easy way to do this: use with-redefs to override function definitions, and then any code within the with-redefs block uses those definitions instead. To verify the input of the side-effecting function, I can override it with …