I want to implement a while loop for example:
while(true) {(assign(n,1));(assign(r,2));}
in prolog. The example can be considered as what happens in OO language such as java while true it will assign n as 1 and r as 2. How do I implement such predicates in prolog where more than one predicate must be executed when while is true.
I want my predicate to be something like
while(true,[(assign(n,1)),(assign(r,2))].