The main purpose of IO is to suspend side effects ...
# arrow
r
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