Question: Write your answer in Prolog Write the rules for a predicate reverse(L, L 1 ), which succeeds if list L 1 is the list L
Write your answer in Prolog
Write the rules for a predicate reverse(L, L1), which succeeds if list L1 is the list L reversed. The following query shows an example of using this predicate:

1. Write the rules for a predicate reverse (L,L1), which succeeds if list L1 is the list L reversed. The following query shows an example of using this predicate: ?- reverse([1,2,3], Ll) Ll
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
