Bryan Kern List Processing Assignment in Prolog rnprint(Ret): Returns a random list of numbers. The user will input a number and whatever that number is, will print a list of numbers that long. For example, rnprint(3) would print 3 random numbers. rnlist(Num,Ret): Similar to rnprint, but it instead prints a random list of numbers. For example, if Num is 3 then a random list of 3 numbers will appear, X = [1,2,4]. count(Num,[List],Ret): Count returns the length of a list of numbers that a user inputs. For example, if a user inputs this: count(3,[1,2,3,3],X) they will get X = 2, because there are two three's in the list. singleton_count([List],Ret): With help from a 'help' predicate, which checks to see if there is a certain amount of occurrences of a number. For example, a person can use the 'help' predicate to check for any amount of identical numbers in a list. With singleton_count a person is able to find all of the single numbers in a list. For example, is a user inputs this singleton_count([1,2,1,2,3],X) X would return 1. doubleton_count([List],Ret): Using the same help predicate as singleton_count, one can find all of the identical numbers that occur twice in a list. doubleton_count([1,1,2,3,3],X), X would equal 2. reverse([List],Ret): reverse does exactly what is says it does, it reverses a list. If a person inputs this: reverse([1,2,3],X), they will get back X = [3,2,1]. sarahPalindrome([List]): This returns a true/false value, and uses reverse to help it decide whether something is a palindrome or not. A user would input a list [1,2,1] and check to see if it is palindrome. fact(Num,Ret): This was a fun one to do. This returns a factorial of a given number. I used iota,lastput and product predicates to find a factorial of a number. fact(4,X) would return X = 24.