Brad M
02/20/2021, 11:24 PMCLOVIS
02/21/2021, 4:26 AMCLOVIS
02/21/2021, 4:27 AMsuspend (T) -> V
is isomorphic with IO
? Not sure though.simon.vergauwen
02/22/2021, 8:21 AMIO
.
suspend
is indeed isomorphic with IO
, and you can leverage it to achieve the exact same semantics and guarantees as with IO
. Only suspend
is native to the Kotlin Compiler, and thus results in more efficient programs.
With the added benefit that this makes Arrow's functional effect system much more idiomatic in Kotlin.Brad M
02/22/2021, 7:46 PM