(defun make-cbuffer-reader (fn) (lambda (buf) (if (cbuffer-p buf) (let ((stream (make-cbuffer-input-stream buf))) (funcall fn stream)) buf)))