 
 : run-spider-loop ( spider -- )
     dup spider-page? [
-        [ spider-next-page ] [ run-spider-loop ] bi
+        [ spider-next-page ] [ spider-sleep ] [ run-spider-loop ] tri
     ] [
         drop
     ] if ;

    [ add-nonmatching ]
    [ tuck [ apply-filters ] 2dip add-todo ] 2bi ;

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

: print-spidering ( url depth -- )
    "depth: " write number>string write

    >url
    spider new
        over >>base
        over >>currently-spidering
        swap 0 <unique-deque> [ push-url ] keep >>todo
        <unique-deque> >>nonmatching
        0 >>max-depth
