Toelichting Eindtoets
FP
Some explanation about the final test:
- since almost no-one (kudo's for those who did) managed to answer question 6b, I have decided to add 10% to the final mark, since the total number of achievable points was apparently less than 10.
- quite a number of people start their induction proof by considering the case
f ([] ++ []). This is not a proper induction proof. The proof given in the "uitwerking" does not make any assumptions about the ys, and so we do not have to use this in the induction. Induction over the xs is sufficient. Furthermore many people have taken for granted that (fx: map f xs) ++ map f y is the same as x : (map f xs ++ map f ys), some refer to this as associativity; we can only conclude this by using the definition for ++ once more to rewrite the the left-hand side.
- in the case of the 4a there was a small complication in that the substitution for the arguments in the
Fun alternative only succeeds if it succeeds for all the arguments. Most have missed this point; I have not substracted points for this.
- some have given a general case for the
evalTerms writing something like foldr (-) (map eval_term args). Strictly speaking this is incorrect, since 5-3-2+ is not =5-(3-2). I have not substracted points here, since handling the case for just two arguments would have been sufficient.
--
DoaitseSwierstra - 07 Feb 2010