Dependency Injection with F# and Composition Language 1 (Video)

In this video I show an example of Dependency Injection where functions and types and defined using F# and where functions are composed using Composition Language 1.

Because DIVEX allows injection of a function, say function 1, into another function, say function 2, even if function 1 has extra parameters compared to the dependency parameter defined in function 2, we can delay the injection of impure dependencies to the last possible moment.

The source code is here: https://github.com/ymassad/DivexExamples/tree/main/DependencyInjectionFSharp

The code in this example is based on code from fsharpforfunandprofit.com (see https://fsharpforfunandprofit.com/posts/dependencies-2/).

The license for the original code can be found here: https://fsharpforfunandprofit.com/about/license/

You can download the DIVEX Visual Studio extension from https://divex.dev

Leave a Reply

Your email address will not be published. Required fields are marked *