Libraryless. Click here for Pure Java version (10045L/55K).
1 | static <A, B> LPair<A, B> filterPairA(IPred<A> pred, Iterable<Pair<A, B>> c) { |
2 | ret filterPairA(c, pred); |
3 | } |
4 | |
5 | static <A, B> LPair<A, B> filterPairA(Iterable<Pair<A, B>> c, IPred<A> pred) { |
6 | new LPair<A, B> x; |
7 | if (c != null) for (Pair<A, B> p : c) |
8 | if (p != null && pred.get(p.a)) |
9 | x.add(p); |
10 | ret x; |
11 | } |
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: | 245 / 376 |
Version history: | 5 change(s) |
Referenced in: | [show references] |