Skip to content
Prev Previous commit
Next Next commit
Fix 2 occurrences of map-to-for
This `map` operation can be replaced with a `for/list` loop.
  • Loading branch information
resyntax-ci[bot] committed May 11, 2025
commit 71ab8be2f37670e80f6d882792022a627c13a075
13 changes: 6 additions & 7 deletions drracket-core-lib/drracket/drracket.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,12 @@
(for/list ([x (in-list (find-relevant-directories (list id)))])
(define proc (get-info/full x))
(if proc
(map (λ (dirs)
(apply build-path
x
(if (list? dirs)
dirs
(list dirs))))
(proc id (λ () '())))
(for/list ([dirs (in-list (proc id (λ () '())))])
(apply build-path
x
(if (list? dirs)
dirs
(list dirs))))
'()))))

(define make-compilation-manager-load/use-compiled-handler
Expand Down
11 changes: 5 additions & 6 deletions drracket-core-lib/drracket/sprof.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,11 @@
(set! clear-old-pr void)
(define denom-ht (make-hasheq))
(define filtered-gui-display-data
(map (λ (pr)
(let ([id (car pr)]
[stacks (filter-stacks (cdr pr))])
(for-each (λ (stack) (hash-set! denom-ht stack #t)) stacks)
(cons id stacks)))
gui-display-data))
(for/list ([pr (in-list gui-display-data)])
(define id (car pr))
(define stacks (filter-stacks (cdr pr)))
(for-each (λ (stack) (hash-set! denom-ht stack #t)) stacks)
(cons id stacks)))
(define denom-count (hash-count denom-ht))
(let loop ([prs filtered-gui-display-data]
[first? #t]
Expand Down