Skip to content

Commit

Permalink
Fix 1 occurrence of let-to-define
Browse files Browse the repository at this point in the history
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
  • Loading branch information
resyntax-ci[bot] committed Dec 18, 2024
1 parent 634b20f commit cdbcc16
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions scribble-doc/scribblings/scribble/class-diagrams.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -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))))
Expand Down

0 comments on commit cdbcc16

Please sign in to comment.