(define (mix l1 l2) (if (null? l1) l2 (if (null? l2) l1 (cons (car l1) (cons (car l2) (mix (cdr l1) (cdr l2))))))) ;;; Return the even-numbered elements of lst (starting with 0) (define (split1 lst) (if (null? lst) lst (if (null? (cdr lst)) lst (cons (car lst) (split1 (cdr (cdr lst))))))) ;;; Return the odd-numbered elements of lst (starting with 1) (define (split2 lst) (if (null? lst) lst (if (null? (cdr lst)) '() (cons (car (cdr lst)) (split2 (cdr (cdr lst))))))) ;;; Retturn sub-lists with even and odd elements (define (split lst) (list (split1 lst) (split2 lst))) ;;; Test cases (split1 '(1 2 3 4 5 6 7 8)) (split1 '(1 2 3 4 5 6 7)) (split1 '(1)) (split2 '(1 2 3 4 5 6 7 8)) (split2 '(1 2 3 4 5 6 7)) (split2 '(1)) (split '(1 2 3 4 5 6 7 8)) (split '(1 2 3 4 5 6 7)) (split '(1))