DeepRecursiveScope

Platform and version requirements: JVM (1.4), JS (1.4), Native (1.4)
@ExperimentalStdlibApi sealed class DeepRecursiveScope<T, R>

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.

Parameters

T - function parameter type.

R - function result type.

Functions

Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)

callRecursive

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.

abstract suspend fun callRecursive(value: T): R

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.

abstract suspend fun <U, S> DeepRecursiveFunction<U, S>.callRecursive(
    value: U
): S
Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)

invoke

operator fun DeepRecursiveFunction<*, *>.invoke(
    value: Any?
): Nothing

© 2010–2021 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-deep-recursive-scope/index.html