Rohan Maity
06/26/2024, 7:05 AMsuspend 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?ephemient
06/26/2024, 7:10 AMDeep recursive functions can also mutually call each other using a heap for the stack via callRecursive extension.
Rohan Maity
06/26/2024, 7:13 AM