Question: 1. Define a recursive function ALL-SAME-AS-ELEMENT that has two arguments, an atom and a list. ALL-SAME-AS-ELEMENT should test whether all the elements in the list

1. Define a recursive function ALL-SAME-AS-ELEMENT that has two arguments, an atom and a list. ALL-SAME-AS-ELEMENT should test whether all the elements in the list are the same as the atom. Should this be the case, the value returned should be T, otherwise NIL. Examples: (ALL-SAME-AS-ELEMENT 'X '(X X X)) (Links to an external site.) T (ALL-SAME-AS-ELEMENT 'Y '(X Y X)) (Links to an external site.) NIL

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!