Fork me on GitHub

i have a question about the order of s-expressions that follow a fact type. from what i understand, variables have to be bound before they can be used in a predicate so i’m puzzled as to why this happens: [P (> ?x 5) (= ?x *)] , where P is a record with field *, produces an execution error as expected, but [P (= ?x 5) (= ?x *)] executes fine.


The first fails, as mentioned, because of the unbound binding. The second succeeds because ?x would be bound to the value 5


Then checking if * equals ?x


right, thank you! i was confused by the syntax overloading


I often have wished there was alternative syntax for binding. But = does make some sense anyways. I understand it sometimes being confusing though.