Libraryless. Click here for Pure Java version (1870L/12K).
1 | static <A> CloseableIterableIterator<A> filterCloseableIterator(final CloseableIterableIterator<A> it, final F1<A, Bool> f) { |
2 | if (it == null) null; |
3 | ret (CloseableIterableIterator) iteratorFromFunction_withEndMarker_f0_autoCloseable(func -> O { |
4 | while (it.hasNext()) { |
5 | A a = it.next(); |
6 | if (callF(f, a)) |
7 | ret a; |
8 | } |
9 | ret endMarker(); |
10 | }, it); |
11 | } |
12 | |
13 | static <A> CloseableIterableIterator<A> filterCloseableIterator(final F1<A, Bool> f, final CloseableIterableIterator<A> it) { |
14 | ret filterCloseableIterator(it, f); |
15 | } |
Began life as a copy of #1015351
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: | #1023550 |
Snippet name: | filterCloseableIterator |
Eternal ID of this version: | #1023550/5 |
Text MD5: | 7b3f48ec74bd30729588ac6698e8a381 |
Transpilation MD5: | 6305ef527096f87bb6d32cacf20ed20d |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-08-13 11:07:23 |
Source code size: | 555 bytes / 15 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 235 / 331 |
Version history: | 4 change(s) |
Referenced in: | [show references] |