Sum and length with foldleft.