Skip to content

Commit

Permalink
fix sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Jan 9, 2024
1 parent a0c1e63 commit f21298e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions packages/marshal/src/rankOrder.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,10 @@ harden(assertRankSorted);
* function. This is a genuine bug for us NOW because sometimes we sort
* in reverse order by passing a reversed rank comparison function.
*
* @param {Iterable<Passable>} passables
* @template {Passable} T
* @param {Iterable<T>} passables
* @param {RankCompare} compare
* @returns {Passable[]}
* @returns {T[]}
*/
export const sortByRank = (passables, compare) => {
if (Array.isArray(passables)) {
Expand Down
4 changes: 2 additions & 2 deletions packages/patterns/src/keys/merge-set-operators.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const { quote: q, Fail } = assert;
* to `fullOrder`. However, it optimizes for the case where these contiguous
* runs that need to be resorted are either absent or small.
*
* @template T
* @template {import('../types').Passable} T
* @param {T[]} elements
* @param {RankCompare} rankCompare
* @param {FullCompare} fullCompare
Expand Down Expand Up @@ -89,7 +89,7 @@ const windowResort = (elements, rankCompare, fullCompare) => {
* For sets, these counts are always 0 or 1, but this representation
* generalizes nicely for bags.
*
* @template T
* @template {import('../types').Passable} T
* @param {T[]} xelements
* @param {T[]} yelements
* @returns {Iterable<[T,bigint,bigint]>}
Expand Down

0 comments on commit f21298e

Please sign in to comment.