commonMain.it.unibo.tuprolog.collections.RetrieveResult.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of theory-metadata Show documentation
Show all versions of theory-metadata Show documentation
In-memory storage and indexing facilities for ordered and unordered knowledge bases composed by logic clauses
package it.unibo.tuprolog.collections
import it.unibo.tuprolog.core.Clause
import kotlin.js.JsName
sealed class RetrieveResult {
@JsName("collection")
abstract val collection: C
data class Success(
override val collection: C,
@JsName("clauses") val clauses: List
) : RetrieveResult() {
@JsName("firstClause")
val firstClause: Clause
get() = clauses.first()
}
data class Failure(override val collection: C) : RetrieveResult()
}