I want to empty a used variable in Prolog. For example, I want to do like this:
i = null;
but in Prolog.
How do I do this?
You cannot do that with pure prolog variables; once a variable is instantiated its value cannot change.
You could use global variables, but I strongly recommend to try to think a less imperative way to write the program.
edit: check DaveEdelstein's comment too
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With