(define first car) (define rest cdr) (define (list-of-persons file-name) (let ((ll '())) (with-input-from-file file-name (lambda () (do ((el (read) (read))) ((eof-object? el) ll) (set! ll (cons el ll))))))) (define (write-addresses file-name) (with-output-to-file file-name (lambda () (let ((ll '(("Perry" "Rhodan" "Erde" "perry@the.galaxy") ("Albert" "Einstein" "somewhere" "albert@somewhere") ("Nathan" "der Weise" "Stadt des Wissens" "Nathan@who.knows.much") ("Bill" "Gates" "M$-Town" "bill@unhappiest_city")))) (let loop ((l ll)) (if (null? l) #f (begin (write (first l)) (newline) (loop (rest l))))))) 'truncate/replace) (values))