(define (list-split lst x) (define (list-split% lst x ret elem) (if (null? lst) (if (null? elem) ret (cons (reverse elem) ret)) (if (equal? x (car lst)) (list-split% (cdr lst) x (cons (reverse elem) ret) '()) (list-split% (cdr lst) x ret (cons (car lst) elem))))) (reverse (filter (o not null?) (list-split% lst x '() '()))))