Write a PROLOG program to count the elements in a list (a list within the list counts
Question:
Write a PROLOG program to count the elements in a list (a list within the list counts as one element). Write a program to count the atoms in a list (count the elements within any sublist). Hint: several meta-predicates such as atom() can be helpful.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Artificial Intelligence Structures And Strategies For Complex Problem Solving
ISBN: 9780321263186
5th Edition
Authors: George F. Luger
Question Posted: