accumulating with loop



Is there any way I can do this fold w/o the setf?

(loop :with state := next-state
:for i :from 0 :below n
:do (setf state (build-nfa regex state))
:finally (return state)))

Thanks,

Matt
.