Write a function called reverselist that takes a list as an argument and reverses that list (you may not use the built-in function reverse). Example:
(reverselist '(a b c)) ==> (c b a)
(reverselist '((a) (b c)) ==> ((b c) (a))
Write a function called remove-last that removes the last top-level occurrence of a given atom in a list:
(remove-last 'a '(a b a b a)) ==> (a b a b)
Write a procedure called pairwise-sum that takes two lists of the same length and returns a list containing the sums of the corresponding elements in the two lists:
(pairwise-sum '(1 2 3) '(2 3 4)) ==> (3 5 7)
Write as procedure called index that takes two arguments, an atom a and a list of atoms ls, and returns the zero-based index of a in ls. If a is not found, it should return -1.
(index 'a '(b c d a)) ==> 3
(index 'a '(b c d e)) ==> -1
Write a function called reverse-all that takes a list as an argument and reverses that list. It should also reverse the elements in any nested lists (you may not use the built-in function reverse). Example:
(reverse-all '(a b c)) ==> (c b a)
(reverse-all '((a) (b c)) ==> ((c b) (a))
Write a function find-largest that takes a list of numbers and returns the largest number in the list.
(find-largest '(2 4 8 5)) ==> 8
Write a function find-largest-all that takes a list of numbers (with nested lists of numbers) and returns the largest number in the list.
(find-largest-all '(2 (4) (8 5))) ==> 8
Write a function palindrome? that takes a list of atoms and tests to see if it is a palindrome (the reverse of the list is the same as the list).
(palindrome? '(a b c d)) ==> #f
(palindrome? '(a b b a)) ==> #t