executes two goals.
','/2 succeeds if Goal1 and Goal2 succeed. If
Goal1 fails Goal2 will not be executed.
By backtracing Goal1
as well as Goal2 can have more than one solution. First Goal2 is backtraced. After finding all solutions of Goal2 Goal1 will
be backtraced.
','/2 is a predefined infix-operator with priority 1000 which
is right-associative (see also current_op/3).
Goal1 goal Goal2 goal
| ','(X=3,integer(X)). | Succeeds with substitution X <- 3. |
| write('goal1 - '),write(goal2). | Succeeds and writes 'goal1 - goal2'. |
This predicate is part of the ISO-Prolog Standard.
| scroll to top |
|