When does the `suspend fun <U, S> DeepRecursiveFun...
# coroutines
r
When does the
suspend fun <U, S> DeepRecursiveFunction<U, S>.callRecursive(value: U): S
in DeepRecursiveFunction gets called by
runCallLoop
? There are two
callRecursive
methods •
override suspend fun callRecursive(value: T)
in
DeepRecursiveScope
oerride suspend fun <U, S> DeepRecursiveFunction<U, S>.callRecursive(value: U): S
in
DeppRecusiveScope
with context reciever being
DeepRecursiveFunction
But when does the second one gets invoked?
✔️ 1
e
as per the docs, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-deep-recursive-function/
Deep recursive functions can also mutually call each other using a heap for the stack via callRecursive extension.
thank you color 1
r
Oh understood its for Mutually Recursive calls Thanks this helped