Convert a macro to function

I had a macro here before to perform variable capture and modify
parameters in the lexical environment of the invocation, but that can
be confusing, so I converted it to a simple function where the caller
must explicitly use setf.