To recap:
- There was a trailing parenthesis missing. You seem to have added it now.
'(Cannot locate string: invalid index)
chokes because of the colon:
locate-string
has no variable list. You probably meant string.
And why not format the last function like so:
(defun construct-string (string index)
(append
(reverse (new-substring (cdr (locate-string (reverse string) (- (length string) index)))))
(cons
(new-strand (1+ (length (car (locate-string string index)))) 'nstrand)
(new-substring (cdr (locate-string string index))))))