![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Recursion and Higher-order Functions - slide 6 : 35 |
(define (string-merge str-list-1 str-list-2) (cond ((null? str-list-1) (apply string-append str-list-2)) ((null? str-list-2) (apply string-append str-list-1)) (else (string-append (car str-list-1) (car str-list-2) (string-merge (cdr str-list-1) (cdr str-list-2))))))
![]() | A tail recursive version of string-merge. |
![]() | More about string-merge |