nl_tokens: Sifts down a node .
pl_tokens: function siftdown ( compare , a , i , j , k ) { var current = k - i ; while ( true ) { // address of the first child in a zero-based // binary heap var firstchild = 2 * current + 1 ; // if current node has no children // then we are done if ( firstchild >= j - i ) break ; // if current value is smaller than its smallest // child then we are done var candidate = ( 0 , _nextchild2 . default ) ( compare , a , i + firstchild , j ) ; if ( compare ( a [ i + current ] , a [ candidate ] ) <= 0 ) break ; // otherwise // swap with smallest child var tmp = a [ i + <mask> ] ; a [ i + current ] = a [ candidate ] ; a [ candidate ] = tmp ; current = candidate - i ; } return i + current ; }