Fixed a minor bug; made a small change using FOLDR.
This commit is contained in:
parent
a195317fc8
commit
c23ba5b0cb
|
@ -55,7 +55,7 @@
|
|||
|
||||
;;; Is X a pid or a proc?
|
||||
|
||||
(define (pid/proc? x) (or (proc? x) (and (integer? x) (>= pid 0))))
|
||||
(define (pid/proc? x) (or (proc? x) (and (integer? x) (>= x 0))))
|
||||
|
||||
|
||||
;;; Process reaping
|
||||
|
@ -296,13 +296,12 @@
|
|||
(define reaped-procs '()) ; Reaped, but not yet waited.
|
||||
|
||||
(define (filter-weak-ptr-list pred lis)
|
||||
(reverse (reduce (lambda (result wptr)
|
||||
(let ((val (weak-pointer-ref wptr)))
|
||||
(foldr (lambda (wptr result) (let ((val (weak-pointer-ref wptr)))
|
||||
(if (and val (pred val))
|
||||
(cons wptr result)
|
||||
result)))
|
||||
'()
|
||||
lis)))
|
||||
list))
|
||||
|
||||
;;; Add a newly-reaped proc to the list.
|
||||
(define (add-reaped-proc! pid status)
|
||||
|
|
Loading…
Reference in New Issue