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

22
LINES

< > BotCompany Repo | #1011456 // ai_withoutInvalidWebs

JavaX fragment (include)

1  
static Collection<Web> ai_withoutInvalidWebs(Collection<Web> l) {
2  
  if (l == null) null;
3  
  for (Web n : l)
4  
    if (ai_isInvalidWeb(n)) {
5  
      Iterator<Web> it = iterator(l);
6  
      Web node;
7  
      new L<Web> x;
8  
      while ((node = it.next()) != n)
9  
        x.add(node);
10  
      while (it.hasNext()) {
11  
        node = it.next();
12  
        if (!ai_isInvalidWeb(node))
13  
          x.add(node);
14  
      }
15  
      ret x;
16  
    }
17  
  ret l;
18  
}
19  
20  
static L<Web> ai_withoutInvalidWebs(L<Web> l) {
21  
  ret (L) ai_withoutInvalidWebs((Collection) l);
22  
}

Author comment

Began life as a copy of #1011427

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: #1011456
Snippet name: ai_withoutInvalidWebs
Eternal ID of this version: #1011456/1
Text MD5: 3f8d83392785f7df286413bf8ef5cdfd
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-10-29 20:44:50
Source code size: 542 bytes / 22 lines
Pitched / IR pitched: No / No
Views / Downloads: 417 / 448
Referenced in: [show references]