M
Size: a a a
M
M
AT
L
E
M
GP
GP
M
M
E
GP
E
M
L
def run(args: List[String]): ZIO[ZEnv, Nothing, ExitCode] =
(for {
duration <- getAlarmDuration
_ <- ZIO.sleep(duration)
_ <- putStrLn("Time to wakeup!!!")
} yield ()).exitCode
- выглядит уродиво def run(args: List[String]): ZIO[ZEnv, Nothing, ExitCode] = {
val program = for {
duration <- getAlarmDuration
_ <- ZIO.sleep(duration)
_ <- putStrLn("Time to wakeup!!!")
} yield ()
program.exitCode
}
- гораздо лучше, но приходиться выдумывать имена, аналогично ситуации с имлиситами во второй скале.