| The Modular DocBook Stylesheets | ||
|---|---|---|
| Prev | DSSSL Library | Next |
(assoc obj alist)
Given an associative list, returns the pair that has obj as a car or #f if no such pair exists.
The associative key to locate.
The associative list.
(assoc "a" (("a" "b") ("c" "d"))) returns ("a" "b")
Norman Walsh, <norm@berkshire.net>
(define (assoc obj alist)
;; Returns the association of an object in an associative list
(let loop ((al alist))
(if (null? al)
#f
(if (equal? obj (car (car al)))
(car al)
(loop (cdr al))))))| Prev | Home | Next |
| assoc-objs | Up | case-fold-down-char |
Copyright © 1997, 1998 Norman Walsh