• Emits the currently ranked 'highest' value from a stream. Only values exceeding the current highest are emitted.

    eg, if we are ranking on numerical value, an input stream of:

    4, 1, 6, 10, 2, 4
    

    Results in the output stream of:

    4, 6, 10
    

    Type Parameters

    • In

    Parameters

    Returns Link<In, In>

    // Rank based on a field
    Chains.Links.rank((a,b) => {
    if (a.size > b.size) return `a`; // Signals the first param is highest
    if (a.size < b.size) return `b`; // Signals the second param is highest
    return `eq`;
    });