Briefly explain the functionality of the following Prolog clauses? my (B, E, R) :- helper(B, E, 1, R). helper(_, O, A, A
Posted: Fri May 20, 2022 12:18 pm
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).