add guards to two uses of seen
This commit is contained in:
parent
2ebb44781f
commit
da5f77e277
|
@ -22,9 +22,9 @@
|
||||||
(let ([accum (let loop ([accum (cons (list indent path fs phase) accum)])
|
(let ([accum (let loop ([accum (cons (list indent path fs phase) accum)])
|
||||||
(cond
|
(cond
|
||||||
[(null? accum) null]
|
[(null? accum) null]
|
||||||
[(hash-ref seen accum #f) null]
|
[(and seen (hash-ref seen accum #f)) null]
|
||||||
[else
|
[else
|
||||||
(hash-set! seen accum #t)
|
(when seen (hash-set! seen accum #t))
|
||||||
(cons (car accum) (loop (cdr accum)))]))])
|
(cons (car accum) (loop (cdr accum)))]))])
|
||||||
(for ([i (in-list (reverse accum))])
|
(for ([i (in-list (reverse accum))])
|
||||||
(apply show i))))
|
(apply show i))))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user