Skip to content

Commit 50b85cf

Browse files
resyntax-ci[bot]rfindler
authored andcommitted
Fix 1 occurrence of and-let-to-cond
Using `cond` allows converting `let` to internal definitions, reducing nesting
1 parent d02f7bc commit 50b85cf

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

drracket-core-lib/drracket/private/get-defs.rkt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,13 @@
9696
(and smallest-i
9797
(string-length (define-popup-info-prefix
9898
(list-ref the-define-popup-infos smallest-i))))
99-
(and smallest-i
100-
(let ([proc (define-popup-info-get-name
101-
(list-ref the-define-popup-infos smallest-i))])
102-
(if proc
103-
(lambda (text pos) (proc text pos get-defn-name))
104-
get-defn-name)))
99+
(cond
100+
[smallest-i
101+
(define proc (define-popup-info-get-name (list-ref the-define-popup-infos smallest-i)))
102+
(if proc
103+
(lambda (text pos) (proc text pos get-defn-name))
104+
get-defn-name)]
105+
[else #f])
105106
final-positions))
106107

107108
(define defs

0 commit comments

Comments
 (0)