DeepRecursiveScope

sealed class DeepRecursiveScope<T, R>(source)

A scope class for DeepRecursiveFunction function declaration that defines callRecursive methods to recursively call this function or another DeepRecursiveFunction putting the call activation frame on the heap.

Since Kotlin

1.7

Parameters

T

function parameter type.

R

function result type.

Constructors

Link copied to clipboard
protected constructor()

Functions

Link copied to clipboard
abstract suspend fun callRecursive(value: T): R

Makes recursive call to this DeepRecursiveFunction function putting the call activation frame on the heap, as opposed to the actual call stack that is used by a regular recursive call.

Since Kotlin 1.7
abstract suspend fun <U, S> DeepRecursiveFunction<U, S>.callRecursive(value: U): S

Makes call to the specified DeepRecursiveFunction function putting the call activation frame on the heap, as opposed to the actual call stack that is used by a regular call.

Since Kotlin 1.7
Link copied to clipboard
operator fun DeepRecursiveFunction<*, *>.invoke(value: Any?): Nothing
Since Kotlin 1.7