1 | // pred: func(int) -> bool |
2 | static <A> Pair<L<A>> mapLike filterAntiFilterListByPredicateOnIndex(O pred, L<A> l) { |
3 | new L<A> yes; |
4 | new L<A> no; |
5 | int n = l(l); |
6 | for i to n: |
7 | (isTrue_callF(pred, i) ? yes : no).add(l.get(i)); |
8 | ret pair(yes, no); |
9 | } |
Began life as a copy of #1024711
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1024713 |
Snippet name: | filterAntiFilterListByPredicateOnIndex |
Eternal ID of this version: | #1024713/1 |
Text MD5: | 0e8042578396309f857d12def4a70423 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-08-24 12:38:04 |
Source code size: | 259 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 162 / 194 |
Referenced in: | [show references] |