clara

ishodge 2021-09-09T16:56:46.001900Z

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.

ethanc 2021-09-09T18:26:26.004Z

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

ethanc 2021-09-09T18:27:15.004600Z

Then checking if * equals ?x

2021-09-17T01:05:34.014400Z

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

ishodge 2021-09-10T03:34:55.006200Z

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