Alejandro Serrano Mena
03/03/2023, 8:28 AMYoussef Shoaib [MOD]
03/03/2023, 11:39 AMAt a conceptual level, you can think ofas simply a functionContinuation<A>
. This means the caller can change how the function "returns," but changing the continuation passed as parameter(A) -> Unit
.k
Alejandro Serrano Mena
03/03/2023, 11:51 AMNorbi
03/04/2023, 8:08 PMAlejandro Serrano Mena
03/07/2023, 9:57 AMsuspend
mechanismNorbi
03/07/2023, 10:05 AMyou can decide that if you call a certain function, nothing else in the block ought to be executedHmmm, this must be the key reason for using them. But cannot this mechanism also be implemented by using non-
suspend
functions and throwing-catching exceptions?Alejandro Serrano Mena
03/07/2023, 10:48 AMresume
)Norbi
03/07/2023, 4:26 PMyou cannot do things like “pause execution, do a bit on the side, then resume where it was before”,One last question: then how is it possible to have an
eagerEffect {}
as well in Arrow? Does it have some serious limitations compared to effect {}
?