Is there a way to retractall clauses by partial match .. let say i have the following grammar :
s3-->[a, b, r, a].
s4-->[a, b].
s5-->s4, s4.
how can I delete all clauses starting with 's' ?
exists(Prefix, Max, X) :- between(1,Max,I), atom_concat(Prefix,I,X),current_predicate(X/2).
exists(X) :- exists('s', 10, X).
clean :- findall(X,(exists(X), abolish(X/2)), R).