1 2
(let ((counter (with-input-from-file "counter" read))) (with-output-to-file "counter" (lambda () (write (add1 counter)))))