What to hand in, and how to hand it in
- Make a directory
~/cs2613/assignments/A2
(i.e. in your git repo for this class). All files related to this assigment should be saved in that directory. - Make sure you commit and push all your work using git before 16:30 on Thursday February 6.
Marking
- This assignment will be worth 5% of your final grade.
- For a marking scheme, see racket-assignment
Questions
Solve FICS exercices 30
Note the rules of the exercise your solution(s) should not use
explicit recursion or helper functions. You can (and should) use
lambda
. For full marks you should not use any builtins other than
map
,filter
,foldr
,foldl
lambda
if
,cond
,not
cons
,empty
equal?
,cons?
,empty?
You can define functions other than unique-left
and unique-right
to help debug your solution, but don’t call them; rather substitute
the definition body into your final solution. Here are some test
cases. You may also want to compare the output from your solutions
that from the unique-right
function you wrote L06.
(check-expect (unique-right (list 1 4 2 1 5 4)) (list 2 1 5 4))
(check-expect (unique-left (list 1 4 2 1 5 4)) (list 1 4 2 5))