The author doesn’t mention it in the article but the pattern suggested is inversion of control (IoC) which is one of my favorites. Highly suggest looking into it if you’ve not heard of it.
[1] https://en.wikipedia.org/wiki/Dependency_inversion_principle
I am in injecting a function that returns a `User` type. That is the interface. I, the function accepting the injected function, don't care how it gets that `User` (that's the implementation). I just care that I am getting a `User`.
Now, knowing that, I can inject any number of function implementations that implement that interface. As long as a `User` gets returned it does not matter how the sausage gets made so to speak.