network,compact-tbf: Use for/hash instead of hash-filter.
This commit is contained in:
parent
f7e44df117
commit
2a0cfb4dcc
1 changed files with 3 additions and 1 deletions
|
@ -1526,7 +1526,9 @@
|
|||
;;; are 0.
|
||||
(define (compact-tbf tbf)
|
||||
(tbf/state
|
||||
(hash-filter (tbf/state-w tbf) #:predicate (compose not zero?))
|
||||
(for/hash ([(k v) (in-hash (tbf/state-w tbf))]
|
||||
#:unless (zero? v))
|
||||
(values k v))
|
||||
(tbf/state-θ tbf)))
|
||||
|
||||
(module+ test
|
||||
|
|
Loading…
Reference in a new issue