;;; $Id: dot-notation.scm,v 1.6 2002/04/09 22:25:24 leavens Exp $ ;;; ;;; AUTHOR: Gary T. Leavens (load-quietly-from-lib "vector-map.scm") (deftype dot-notation (-> (datum) datum)) (define dot-notation (lambda (arg) ;; ENSURES: result is a list that, when evaluated gives the value arg, ;; but uses dot notation, so that, when printed it displays ;; the structure of the cons cells. (cond ((vector? arg) (vector-map dot-notation (has-type-trusted (vector-of datum) arg))) ((not (pair? arg)) (has-type-trusted datum arg)) (else (list (dot-notation (car (has-type-trusted (pair-of datum datum) arg))) (string->symbol ".") (dot-notation (cdr (has-type-trusted (pair-of datum datum) arg))))))))