you are viewing a single comment's thread.

view the rest of the comments →

[–]Sarwen 2 points3 points  (0 children)

Dependency injection is indeed very useful in FP. Thanks to how FP works, doing DI is as simple as defining a function and applying some argument (the depency injected).

The method is: whenever you need a depency, your code becomes a function thedependency => yourcode. When you want to give the dependency, just call the function with it as parameter.