https://kotlinlang.org logo
#arrow
Title
# arrow
r

raulraja

05/21/2019, 7:34 PM
The main purpose of IO is to suspend side effects so they can be evaluated at the edge. A suspend function invoking another suspend function is still pure because there is guarantees neither of those function can be invoked within a pure function unless in the context of the IO continuation that Fx provides. If anything suspend composition is not stack safe by default but again, Kotlin allows
tailrec
in suspend functions and Arrow Fx automatically trampolines if needed as you use
!
or
flatMap
2 Views