|| Homework 6 Answers

|| Part II

1.

midpoint (x1,y1) (x2,y2) = ((x1+x2)/2,(y1+y2)/2)


|| 2.

no_duplicates [] = []
no_duplicates (x:xs) = x:no_duplicates (filter ((~=) x) xs)

|| Also possible:

no_duplicates [] = []
no_duplicates (x:xs) = no_duplicates xs, if (member xs x)
                     = x : no_duplicates xs, otherwise
