(define (map-match func list) (if (null? list) '() (cons (apply func (car list)) (map-match func (cdr list))))) (map-match (lambda (link-path text) `(li (a (@ (href ,link-path)) ,text))) '(("/projects" "my projects") (("/essays" "stuff I write")))) ; => ((li (a (@ (href "/projects")) "my projects") ; (li (a (@ (href "/essays")) "stuff I write"))