Exercises in this lecture  previous -- Keyboard shortcut: 'p'        Go to the slide, where this exercise belongs -- Keyboard shortcut: 'u'  

Exercise 2.6
A variant of string-of-char-list? **


The function string-of-char-list? was programmed with use of a help function which we called string-of-char-list-1? on this slide. The help function was programmed side by side with string-of-char-list?. As an altertive, string-of-char-list-1? could be programmed as a local function of string-of-char-list? Please do that, using an appropriate name binding form.

The help function keeps track of an index i in an additional parameter. It is possible to program string-of-char-list? without use of a help function. This function should iterate over shorter and shorter text strings. Please do that now. Consider the efficiency of this function and our original version of string-of-char-list?. (The function substring is useful).


Solution