2 ms·
The idea here is that you can separate your "functionality basis" which does require mocking because it genuinely hits the database from "composed functionality
by tel 11y ago
The idea here is that you can separate your "functionality basis" which does require mocking because it genuinely hits the database from "composed functionality" which operates through a pure, monadic DSL and eventually calls down to the functionality basis.
In practice, that functionality basis can be far tinier than the set of things which would require mocking normally. This is a big win.
Also in practice you may want to make the functionality basis larger than it need be semantically because this can be a performance win.