Category: misc


; list->assoc



Navigation:    Index Top-Level Index Text Version (No Diffs)
Last Modified: Thu Oct 5 11:49:38 2006
 

(define (list->assoc lis)
(cond
;((and (proper-list? lis) (> (length lis) 2))
((and (pair? lis) (> (length lis) 2))
(cons (list (car lis) (cadr lis)) (list->assoc (cddr lis)))
)
;((and (proper-list? lis) (= (length lis) 2))
((and (pair? lis) (= (length lis) 2))
(list lis)
)
(else lis)
)
)