It turns out that `len` is very cheap (doesn't recount the length) but thanks for pointing this out.