Skip to content

Instantly share code, notes, and snippets.

View Maatary's full-sized avatar

Maatary

  • United Kingdom
View GitHub Profile
trait DataSourceComponent {
val source: DataSource
trait DataSource {
def getData: List[Int]
}
}
trait HttpRequestComponent {
val http: HttpRequest
trait HttpRequest {
@Maatary
Maatary / Main.scala
Created May 19, 2021 00:12 — forked from yasuabe/Main.scala
main for composed behavior represented in module pattern with ZIO
import scalaz.zio.console.Console
import scalaz.zio._
// "org.scalaz" %% "scalaz-zio" % "1.0-RC3"
sealed trait AppError
case object NoValue extends AppError
trait Logger { val logger: Logger.Service }
object Logger {