             '[
                 _ <= spider get
                 [ count>> ] [ max-count>> ] bi < and
-            ] [ spider-page spider-sleep ] slurp-heap-when
+            ] [ spider-page spider-sleep ] slurp-heap-while
             spider get
         ] with-variable
     ] with-logging ;

        H{ } clone >>spidered ;

<PRIVATE

: relative-url? ( url -- ? ) protocol>> not ;

: apply-filters ( links spider -- links' )
    filters>> [ '[ _ 1&& ] filter ] when* ;

    [ initial-links>> normalize-hrefs 0 ] keep
    [ add-todo ] keep ;

: slurp-heap-while ( heap quot1 quot2: ( value key -- ) -- )
    pick heap-empty? [ 3drop ] [
        [ [ heap-pop dup ] 2dip slip [ t ] compose [ 2drop f ] if ]
        [ roll [ slurp-heap-while ] [ 3drop ] if ] 3bi
    ] if ; inline recursive

PRIVATE>
