I am a complete newbie on Prolog and I had a quick question. I want to write a function that takes no arguments and just does some asserts and retracts. Is this valid?
turnLeftFunc:-
select(currentDirection(dir))->select(leftof(dir,turnDir))->
retract(currentDirection(dir)),
assert(currentDirection(turnDir)).
This is for a wumpus world implimentation.
I want to be able to just say:
some code....
turnLeftFunc,
some more code...
This will hopefully essentially execute the code similar to an inline function in C++.
Thanks