Converting to an AList

left top right

(define (->category-alist alist)
  ;; DESC-LIST is of the form ((name . value) ...)
  (let ((top-level-categories (get-categories desc-list)))
    (let ((top-level-alist
           (map (lambda (category)
                  (cons (category.transmit-name category) category))
                top-level-categories)))
      (append top-level-alist
              (apply append
                     (flatten-alist top-level-alist))))))

Jim Miller

http://www.w3.org/ W3C