Programming Assignment #2 CS4001301
=====================================================================
1. Scheme (50pt)
function name: inv_app
input: 2 lists, list1 and list2
output: inverse of list2 + inverse of list1
Example:
list1 = (1 2 3)
list2 = (a b c)
output = (c b a 3 2 1)
Put your source code in a file named pa2scheme1.scm
and include at lease one test case for your implementation.
2. Scheme (50pt)
function name: dbl_atm
input: an atom and a list
output: a list with all occurrences of the given atom doubled
Example:
atom = a
list2 = (a (b c a (a d)))
output = (a a (b c a a (a a d)))
Put your source code in a file named pa2scheme2.scm
and include at lease one test case for your implementation.
(inv_app '(1 2 3) '(a b c))
; => (c b a 3 2 1)
(dbl_atm 'a '(a (b c a (a d))))
; => (a a (b c a a (a a d)))

http://repl.it/languages/Scheme/