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

12
LINES

< > BotCompany Repo | #1013589 // it_observePrefix

JavaX fragment (include)

1  
static IterableIterator<S> it_observePrefix(final Iterator<S> src) {
2  
  ret iteratorFF(new F0 {
3  
    S prefix;
4  
    
5  
    O get() {
6  
      if (!src.hasNext()) ret endMarker();
7  
      S s = src.next();
8  
      prefix = prefix == null ? s : commonPrefix(prefix, s);
9  
      ret prefix;
10  
    }
11  
  });
12  
}

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: #1013589
Snippet name: it_observePrefix
Eternal ID of this version: #1013589/2
Text MD5: 6dad91d1c56fbb477a1f0c7adf01ec29
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-01-11 13:12:28
Source code size: 298 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 276 / 326
Version history: 1 change(s)
Referenced in: [show references]