Picat Practice Test
Picat Pattern Matching Rules Questions and Answers
A developer defines a predicate to verify if the two elements of a pair structure are identical.
Which rule head correctly implements this check using only pattern matching?
Select your answer
A
check_equal($p(X, Y)) => X == Y.
B
check_equal($p(X, X)) => true.
C
check_equal($p(X, Y)) => X = Y.
D
check_equal($p(X, Y), X == Y).
Hint