length using foldRight