
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An assignment for a cse 3210 course, which involves writing recursive and iterative functions to search for and remove elements from a list based on a given number or index. The functions should be defined for the given examples and the final program should be named 'second'.
Typology: Assignments
1 / 1
This page cannot be seen from the preview
Don't miss anything!

Due Tues. September 16
Example: (position ‘(a b c 3 d) 3) returns 4
Example : (position ‘ (a b c d 4) 5) returns nil
(remover 2 '( a b c d))
(A C D)
(remover 3 '( a b c d))
(A B D)
You CANNOT use nth.
3. Now…destroyer
Use your answer to number 2 to create a function that can eliminate the elements of a list based on their location. Examples:
(destroyer '( a b c d e f g h) '( 6 2)) (A C D E G H) (destroyer '(a b c) '(3 1)) (B) (destroyer '(a b c) '(3 2 1)) NIL
Turn the program in to the project called Second