Briefly explain the functionality of the following Prolog clauses? my (B, E, R) :- helper(B, E, 1, R). helper(_, O, A, A
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Briefly explain the functionality of the following Prolog clauses? my (B, E, R) :- helper(B, E, 1, R). helper(_, O, A, A
Briefly explain the functionality of the following Prolog clauses? my (B, E, R) :- helper(B, E, 1, R). helper(_, O, A, A). helper(B, E, A, R) :- E>0, E2 is E - 1, A1 is A * B, helper(B, E2, A1, R).
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!