In Cats-effect, when is xxx inside IO.pure(xxx) executed?
It’s said IO.pure() means eager evaluation. But it doesn’t seem to so in this example: Here println(“print in pure”) is executed just like as if it’s IO.apply() Another example, however, discloses the truth Here is it how it works: When printTwice() is called, every expression inside it is evaluated IO.apply(println(“print in lazy”)) is evaluated as …
In Cats-effect, when is xxx inside IO.pure(xxx) executed? Read More »