Function LISTOF


Slots on this function:

Documentation:
LISTOF is the sequence constructor function for KIF. It takes any finite number of arguments and denotes the list (i.e., sequence, tuple) of those items.

LISTOF is an operator in KIF.

Instance-Of: Function
Range: List

Axioms:

(Undefined (Arity Listof))


Other Related Axioms:

(Instance-Of (Arity Listof) Undefined)

(=> (Listof $X $Y) (List $Y))

(<- (First ?List)
    (If (Exists (@Items) (= (Listof ?X @Items) ?List)) ?X))

(=> (= (Rest ?List) ?Rest-List)
    (Or (And (Null ?List) (= ?Rest-List ?List))
        (Exists (?X @Items)
                (And (= ?List (Listof ?X @Items))
                     (= ?Rest-List (Listof @Items))))))

(<- (Cons ?X ?List) (If (= ?List (Listof @L)) (Listof ?X @L)))

(<- (Reverse ?List) (Revappend ?List (Listof)))