Right, thanks for that note :)

provideSome is an option, however it requires you to provide a method to construct the new environment by hand. If used often, it could be quite tedious to write those :)

But then, if the number of env-managed dependencies is small, it could be just a couple of functions … e.g. Clock with Connection => Clock and similar. What would further constraint the number of these functions is the env you actually use when working with the database.

Scala software engineer, Functional Programming enthusiast, SoftwareMill co-founder

Scala software engineer, Functional Programming enthusiast, SoftwareMill co-founder