;;; This is an example list to play with (define bar '((created_at) (id) (id_str) ((user) (name) (screen_name) (location)) (geo) ((status) (date) ((web) (url) (description)) (time)) (coordinates))) ;;; My current version (that doesn't work properly) (define (foo lst) (cond [(null? lst) '()] [(list? (car lst)) (cons (car (car lst)) (foo (cdr (car lst))))] [else (cons (car lst) (foo (cdr lst)))])) ;;; This gets things done (well, it should anyway) (map (lambda (x) (foo x)) bar) ;;; What I want it to return: '((created_at) (id) (user name) (user screen_name) (user location) (geo) (status date) (status web url) (status web description) (status time) (coordinates)) ;;; The call to map currently returns. '((created_at) (id) (id_str) (user) (geo) (status) (coordinates))