I believe you know already that the loop code is equivalent to something like: (let* ((comp-ctxt (make-comp-cstr-ctxt)) (h (make-hash-table :test #'eq))) (dolist (x ...