Home Manual Reference Source

Function

Static Public Summary
public

Compile a new comparison function whose underlying total order is the reverse of the input comparison function's underlying total order.

Static Public

public reversed(compare: Function): Function source

Compile a new comparison function whose underlying total order is the reverse of the input comparison function's underlying total order.

Params:

NameTypeAttributeDescription
compare Function

The comparison function to reverse.

Return:

Function

A function f such that compare(a,b) === f(b,a) for all a,b.