Dedup read-in peers before using them
[tt.git] / tt.rkt
diff --git a/tt.rkt b/tt.rkt
index bc8e8bc..c8da01c 100644 (file)
--- a/tt.rkt
+++ b/tt.rkt
   ; TODO No need for map - can just iter
   (void (concurrent-filter-map num-workers peer-download peers)))
 
+(: uniq (∀ (α) (-> (Listof α) (Listof α))))
 (define (uniq xs)
   (set->list (list->set xs)))
 
                     (map string->path paths)])]
          [peers (append* (map file->peers paths))])
     (log-info "Read-in ~a peers." (length peers))
-    peers))
+    (uniq peers)))
 
 (: log-writer-stop (-> Thread Void))
 (define (log-writer-stop log-writer)
This page took 0.026163 seconds and 4 git commands to generate.