;; A List of Symbol (LoS) is either ;; -- empty ;; -- (cons Symbol LoS) #| Template for LoS ;; f : Los -> ??? (define (f los) (cond [(empty? los) ... ] [(cons? los) ... (first los) ... (f (rest los)) ... ])) |# ;; symbol-append: LoS -> String ;; produces a string from the symbols (define (symbol-append los) (cond [(empty? los) "" ] [(cons? los) (string-append (symbol->string (first los)) (symbol-append (rest los)))])) ;; Examples (string=? (symbol-append empty) "") (string=? (symbol-append (cons 'blue empty)) "blue") (string=? (symbol-append (cons 'blue (cons 'red empty))) "bluered")