ZIO 2: From flatMap To for Expressions (Scala 3 Video)
Briefly

To functionally print a user's name in Scala, we can define a function, printName, which uses ZIO.succeed to wrap the println call, indicating it cannot fail.
Since the println function does not throw exceptions, we can define printName to return a ZIO type with the environment as Any and error type as Nothing.
Read at Alvinalexander
[
]
[
|
]