The Bank Kata in Ocaml - Part 3: injecting a clock with Functors
So at the end of part 2 we said we don’t like that we have to add the date as part of the public API. Which makes sense for a public bank terminal, we do a deposit or withdrawal now. So we’ll want to remove on from deposit and withdrawal. But where do the dates come from now? Let’s introduce a Clock module: Let’s see if we can rewrite our test to adapt to this new API »