jdhedden,
It is only fair to calculate $lim once if there is some guarantee that all strings will be the same length. It is possible that is what was intended by
ewijaya's example since I am the only one that dynamically calculated the limit each iteration.