(define (procedure->pretty procedure)
(if (procedure/scode procedure)
(unsyntax (procedure/scode procedure))
- (let ((arg-list (append (procedure/required procedure)
- (if (null? (procedure/optional procedure))
- '()
- (cons lambda-tag:optional
- (procedure/optional procedure)))
- (if (not (procedure/rest procedure))
- '()
- (procedure/rest procedure)))))
+ (let ((arg-list (make-lambda-list
+ (procedure/required procedure)
+ (procedure/optional procedure)
+ (procedure/rest procedure)
+ '())))
(if (procedure/name procedure)
`(named-lambda (,(procedure/name procedure) ,@arg-list)
...)