I’ve been doing some reading about DI in FP, and Ch. 9 of RWO v1 states that functors can solve dependency injection. I have also found an article that perfectly illustrates this, and I can see the pattern there.
I want to ask, how common is this used in practice? Does dependency injection in FP a thing at all (or am I approaching this the wrong way)? How do OCaml devs test modules that interact with other modules/libraries (which are probably impure) in isolation?
I am also aware that you can write your functions accepting the dependency functions as arguments and utilize currying. Is this pattern more reasonable?
If there are projects that make use of either approach for DI and testing, I would love to be pointed to it.