(use-modules (ice-9 popen)) ;;; wrapping curl command (define (curl url) (let* ((port (open-input-pipe (format #f "curl -is \"~a\"" url))) (response (read-string port))) (close-pipe port) response)) (define (maybe-curl url) (catch #t (lambda () (display "." (current-error-port)) (write (cons url (curl url)))) (lambda _ '()))) (define urls (map (lambda _ "http://hyperdev.fr/") (iota 1000))) (display "started") (for-each maybe-curl urls)