; first word

(define (string-index c str)
  (let loop ((ss (string->list str)) (k 0))
    (cond ((null? ss) #f)
          ((char=? (car ss) c) k)
          (else (loop (cdr ss) (+ k 1))))))

(define (first-word str)
  (substring str 0 (string-index #\space str)))

(display (first-word "abcdefg hijklmnop qrs tuv wxyz"))