assoc-objs

Name

assoc-objs -- Returns a list of the objects in an associative list

Synopsis

(assoc-objs alist)

Description

Returns a list of the objects in an associative list.

alist

The associative list. An associative list is a list of lists where each interior list is a pair of elements.

Example

(assoc-objs (("a" "b") ("c" "d"))) returns ("a" "c")

Author

Norman Walsh, <ndw@nwalsh.com>

Source Code

(define (assoc-objs alist)
  ;; Returns a list of the objects in an associative list
  (let loop ((result '()) (al alist))
    (if (null? al)
	result
	(loop (append result (list (car (car al)))) (cdr al)))))