notes for lecture 2, foldr