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

12
LINES

< > BotCompany Repo | #1013589 // it_observePrefix

JavaX fragment (include)

static IterableIterator<S> it_observePrefix(final Iterator<S> src) {
  ret iteratorFF(new F0 {
    S prefix;
    
    O get() {
      if (!src.hasNext()) ret endMarker();
      S s = src.next();
      prefix = prefix == null ? s : commonPrefix(prefix, s);
      ret prefix;
    }
  });
}

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: 346 / 402
Version history: 1 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1013596 - it_observeSuffix