I have two stacks, a goal and a stack I'm altering. As I accomplish each step of the goal-stack, I remove a field from it. I know I've finished a particular goal when that stack is now empty. I'm trying to write a rule to test when the variable is empty, but I keep getting an error: [EXPRNPSR1] A function name must be a symbol. Here is my rule.
(defrule done
(declare (salience 30))
?stack <- (curr-stack $?thusfar)
?goal <- (goal-stack ?H)
(test (= ?H ()))
=>
(retract ?stack ?goal))
Any help is appreciated! Thanks!