- (n-supplied (gensym)))
- (collect ((temps))
- (dotimes (i nargs)
- (temps (gensym)))
- `(lambda (,n-supplied ,@(temps))
- (declare (type index ,n-supplied))
- ,(if (policy nil (zerop safety))
- `(declare (ignore ,n-supplied))
- `(%verify-argument-count ,n-supplied ,nargs))
- (%funcall ,fun ,@(temps))))))
+ (n-supplied (gensym))
+ (temps (make-gensym-list (length (lambda-vars fun)))))
+ `(lambda (,n-supplied ,@temps)
+ (declare (type index ,n-supplied))
+ ,(if (policy nil (zerop safety))
+ `(declare (ignore ,n-supplied))
+ `(%verify-argument-count ,n-supplied ,nargs))
+ (%funcall ,fun ,@temps))))