Unformatted text preview: 7) Define a function that collects the elements that occur more than once: (collect-dups '(a b c a b a d e f)) ==> (a b) 8) Define a function that finds the position (0 based) in a list that a certain element appears for the first time. Example: (find-pos 'B '(A A B C D B)) ==> 2 If the element is found, find-pos returns a number less than the length of the list. But if the element is not found, it returns the length. Example:(find-pos 'X '(A A B C D B)) ==> 6 9) Formalize this: "For every object e, e exists in concatenation of x and y, when e exist in x or y."...
View Full Document
This note was uploaded on 11/30/2010 for the course CS 313K taught by Professor Boyer during the Spring '08 term at University of Texas.
- Spring '08