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

9
LINES

< > BotCompany Repo | #1023137 // lowestByScoreFunction

JavaX fragment (include)

static <A> A lowestByScoreFunction(Iterable<A> l, IF1<A, Number> f) {
  new Lowest<A> lowest;
  for (A a : unnull(l)) {
    Number score = callF(f, a);
    if (score != null)
      lowest.put(a, toDouble(score));
  }
  ret lowest!;
}

Author comment

Began life as a copy of #1020477

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1023137
Snippet name: lowestByScoreFunction
Eternal ID of this version: #1023137/1
Text MD5: da1d4c3d7443e15ee47ad5440acd6dd7
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-05-15 14:24:26
Source code size: 241 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 186 / 216
Referenced in: [show references]