I have a simple Prolog predicate that spits accepts a variable, Result
, that calculates a result then stores it in Result
to be viewed. Sometimes I'm unsure how it comes to the answer it stores in Result
and I'm curious if there's a way in Prolog to get it to show how it got to the answer, I guess show the path it took and how it built it up?
The predicate is something simple like solve(Input, Result).
and Result
can sometimes be peculiar.