1 | static L<Web> nodesToWebs_max(Collection<WebNode> nodes, int max) { |
2 | Set<Web> webs = litorderedset(); |
3 | for (WebNode node : nodes) { |
4 | webs.add(node.web); |
5 | if (l(webs) >= max) |
6 | break; |
7 | } |
8 | ret asList(webs); |
9 | } |
Began life as a copy of #1010703
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1010704 |
Snippet name: | nodesToWebs_max - preserves order, drops duplicates, stop at number |
Eternal ID of this version: | #1010704/1 |
Text MD5: | 13285665782c23ff1ebdbdd20d55db61 |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-09-27 16:22:55 |
Source code size: | 228 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 352 / 416 |
Referenced in: | [show references] |