Here is the variant where the helping function is local - notice the use of letrec (using let will not work): Here is a variant of string-of-char-list? that does not apply a help function: It may be rather expensive to call string-length in this function. As a partial remedy, we bind str-lgt to the value of (string-length str) once and for all.
It may be even cheaper to measure the length of the orginal string once - at top level - and to reduce this length by one for each recursive call.
This, however, requires and extra parameter, and therefore it calls for a help function. It may be even more expensive to call substring in each incarnation of string-of-char-list? With this we materialize a bunch of (shorter and shorter) suffixes of the original string.
This should be avoided, and therefore our first version of the function is far better.