[dictionary access tom@goto10.org**20070411213430] { hunk ./format.ss 57 - (define *dict* '()) + + + ;; it's easier to use paths if they are in (bottom top) format hunk ./format.ss 63 - (p path)) + (p (reverse path))) hunk ./format.ss 70 - (cdr p)))))) + (cdr p))) + (else + (next (cdr d) p))))) + + ;; content store + (define *dict* '()) + + ;; return item or directory listing + (define (at path) + (let ((thing (dict-ref *dict* path))) + (if (list? thing) + (map car thing) + thing))) + + ;; access macros: if argument is an expression, use it to determine + ;; path, otherwise take literal. + (define-syntax @ + (syntax-rules () + ((_ (expr ...)) + (at (expr ...))) + ((_ path ...) + (at '(path ...))))) + + hunk ./website.xml 25 + hunk ./website.xml 27 + + Actually, now it's raining.. + }