As you may already know, ZIO is designed around three type parameters:
ZIO[-R, +E, +A]
You may also remember that a nice mental model of the ZIO data type is the following:
R => Either[E, A]
This means a ZIO effect needs an environment of type R to run, meaning we need to fulfill this requirement in order to make the effect runnable. More concretely, this R type represents a dependency on a module or several modules that are needed for running the effect. Therefore, let’s now discuss how modules are defined in ZIO.