Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

9
LINES

< > BotCompany Repo | #1036556 // pairsSortedByFunctionOnB

JavaX fragment (include) [tags: use-pretranspiled]

Transpiled version (10090L) is out of date.

static <A, B, C> LPair<A, B> lambdaMapLike pairsSortedByFunctionOnB(IF1<B, C> f, Iterable<Pair<A, B>> c) {
  LPair<A, B> l = cloneList(c);
  sort(l, (p1, p2) -> stdcompare(f.get(p1.b), f.get(p2.b)));
  ret l;
}

static <A, B, C> LPair<A, B> pairsSortedByFunctionOnB(Iterable<Pair<A, B>> c, IF1<B, C> f) {
  ret pairsSortedByFunctionOnB(f, c);
}

Author comment

Began life as a copy of #1032236

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): mqqgnosmbjvj, wnsclhtenguj

No comments. add comment

Snippet ID: #1036556
Snippet name: pairsSortedByFunctionOnB
Eternal ID of this version: #1036556/4
Text MD5: 0315a43b3fbf784cce32dabd24b072c4
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2023-02-14 12:39:44
Source code size: 348 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 185 / 252
Version history: 3 change(s)
Referenced in: #761 - New #629 - Standard functions list (LIVE) - continued on #1006654