Return empty set, not list, when no links found

This commit is contained in:
Ray Miller 2024-05-12 16:22:05 +01:00
parent 64cefb1f9a
commit 7f8ad24e81

View file

@ -20,7 +20,7 @@
(let ((x (html->xexp (bytes->string/utf-8 body)))) (let ((x (html->xexp (bytes->string/utf-8 body))))
(handler url x) (handler url x)
(extract-links (string->url url) x))) (extract-links (string->url url) x)))
(_ '()))) (_ (set))))
(define (host=? host) (define (host=? host)
(lambda (u) (string=? host (url-host (string->url u))))) (lambda (u) (string=? host (url-host (string->url u)))))