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

11
LINES

< > BotCompany Repo | #1026685 // filterPairA - filter pairs according to predicate on a

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

Libraryless. Click here for Pure Java version (10045L/55K).

static <A, B> LPair<A, B> filterPairA(IPred<A> pred, Iterable<Pair<A, B>> c) {
  ret filterPairA(c, pred);
}

static <A, B> LPair<A, B> filterPairA(Iterable<Pair<A, B>> c, IPred<A> pred) {
  new LPair<A, B> x;
  if (c != null) for (Pair<A, B> p : c)
    if (p != null && pred.get(p.a))
      x.add(p);
  ret x;
}

Author comment

Began life as a copy of #1023844

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1026685
Snippet name: filterPairA - filter pairs according to predicate on a
Eternal ID of this version: #1026685/6
Text MD5: ca6f56192bf76e82903cb195013806e3
Transpilation MD5: 79f4b94827c0bac9959071ae165795c7
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:16:09
Source code size: 322 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 165 / 276
Version history: 5 change(s)
Referenced in: [show references]