I have an init predicate which asserts some facts. I would like to clean these up after execution.
I'm running queries of the form
init, do_stuff, cleanup.. I would rather not have a separate cleanup call if i can avoid it (because I forget to call it).
I found this as a solution:
init:- assert(foo); not(retract(foo)).
Are there cases I would not want to do this or reasons why I shouldn't?