Question: How not to do tail recursion: PREDICATES nondeterm badcountl(ulong) nondeterm badcount2(ulong) nondeterm badcount3(ulong) nondeterm negative(ulong) CLAUSES badcount 1(Number):- nl,write(Number), Next= Number+1, badcount1(Next), nl. badcount2(Number):- nl,
How not to do tail recursion: PREDICATES nondeterm badcountl(ulong) nondeterm badcount2(ulong) nondeterm badcount3(ulong) nondeterm negative(ulong) CLAUSES badcount 1(Number):- nl,write(Number), Next= Number+1, badcount1(Next), nl. badcount2(Number):- nl, write(Number), Next= Number+1, badcount2(Next). 6
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
