org.jetbrains.kotlinx.jupyter.api.libraries.CodeExecutionCallback.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kotlin-jupyter-api Show documentation
Show all versions of kotlin-jupyter-api Show documentation
API for libraries supporting Kotlin Jupyter notebooks
package org.jetbrains.kotlinx.jupyter.api.libraries
import org.jetbrains.kotlinx.jupyter.api.Code
import org.jetbrains.kotlinx.jupyter.api.KotlinKernelHost
class CodeExecutionCallback(val code: Code) : (KotlinKernelHost) -> Any? {
override fun invoke(host: KotlinKernelHost): Any? {
return host.execute(code).value
}
}