All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.it.unibo.tuprolog.collections.RetrieveResult.kt Maven / Gradle / Ivy

Go to download

In-memory storage and indexing facilities for ordered and unordered knowledge bases composed by logic clauses

There is a newer version: 0.17.4
Show newest version
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()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy