 
 : run-spider ( spider -- spider )
     "spider" [
-        dup queue-initial-links [ run-spider-loop ] keep
+        queue-initial-links
+        [ run-spider-loop ] keep
     ] with-logging ;

    [ base>> host>> ] [ links>> members ] bi*
    [ host>> = ] with partition ;

: add-spidered ( spider spider-result -- )
    [ [ 1 + ] change-count ] dip
    2dup [ spidered>> ] [ dup url>> ] bi* rot set-at
    [ filter-base-links ] 2keep
    depth>> 1 + swap
    [ add-nonmatching ]
    [ dup '[ _ apply-filters ] curry 2dip add-todo ] 2bi ;

: normalize-hrefs ( base links -- links' )
    [ derive-url ] with map ;


: spider-sleep ( spider -- ) sleep>> [ sleep ] when* ;

: queue-initial-links ( spider -- spider )
    [ [ currently-spidering>> ] [ initial-links>> ] bi normalize-hrefs 0 ]
    [ add-todo ]
    [ ] tri ;

: spider-page? ( spider -- ? )
    {
