From cdbcc1699ccd8f8f475d3fe6acad6698c4a56518 Mon Sep 17 00:00:00 2001 From: "resyntax-ci[bot]" <181813515+resyntax-ci[bot]@users.noreply.github.com> Date: Wed, 18 Dec 2024 00:16:07 +0000 Subject: [PATCH] Fix 1 occurrence of `let-to-define` Internal definitions are recommended instead of `let` expressions, to reduce nesting. --- .../scribblings/scribble/class-diagrams.rkt | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/scribble-doc/scribblings/scribble/class-diagrams.rkt b/scribble-doc/scribblings/scribble/class-diagrams.rkt index 2e7a408e0d..dacdbd57b1 100644 --- a/scribble-doc/scribblings/scribble/class-diagrams.rkt +++ b/scribble-doc/scribblings/scribble/class-diagrams.rkt @@ -81,15 +81,16 @@ (hbl-append (normal-font "(") (let loop ([args args]) - (let* ([type (car args)] - [param (cadr args)] - [single-arg (if param - (hbl-append (type-spec type) (normal-font " ") (var-font param)) - (type-spec type))]) - - (cond - [(null? (cddr args)) (hbl-append single-arg (normal-font ")"))] - [else (hbl-append single-arg (normal-font ", ") (loop (cddr args)))]))))]) + (define type (car args)) + (define param (cadr args)) + (define single-arg + (if param + (hbl-append (type-spec type) (normal-font " ") (var-font param)) + (type-spec type))) + + (cond + [(null? (cddr args)) (hbl-append single-arg (normal-font ")"))] + [else (hbl-append single-arg (normal-font ", ") (loop (cddr args)))])))]) (if body (hbl-append (normal-font " {")) (blank))))