(define (expand* lst) (append-map (lambda (item) (match (expand item) ((? pair? p) (cons item (expand* p))) (_ (list item)))) lst))