Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I have a piece of example code in Prolog. I wonder what the predicate/rule/functor s() means in Prolog? (on line that starts with breadth_search). I did not see any declaration of this construction above example code. It might be a system predicate. Who knows?
main(Decision) :-
     initial_state(State),
     breadth_search([s(State,[])],[],[],Decision),
     writeln(Decision).


What I have tried:

Tried to find declaration in example code of this predicate/rule s(), but I did not find any reference to it. It might be a predefined predicate
Posted
Updated 2-Apr-21 5:06am

1 solution

Took me all of 5 seconds to find out... prolog successor[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900