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

10
LINES

< > BotCompany Repo | #1017044 // listPrefixes_notEmpty_rev - returns all prefixes from length full down to 1 as cloned lists

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2659L/17K).

1  
static <A> IterableIterator<L<A>> listPrefixes_notEmpty_rev(fL<A> l) {
2  
  ret iff(new F0 {
3  
    int i = l(l);
4  
    
5  
    public O get() {
6  
      if (i <= 0) ret endMarker();
7  
      ret cloneSubList(l, 0, i--);
8  
    }
9  
  });
10  
}

Author comment

Began life as a copy of #1017043

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1017044
Snippet name: listPrefixes_notEmpty_rev - returns all prefixes from length full down to 1 as cloned lists
Eternal ID of this version: #1017044/1
Text MD5: 3fcf84233666958009b1882a7d167b7a
Transpilation MD5: 6fbec83edaaa29839716fb30aa58f54b
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-07-11 13:29:49
Source code size: 226 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 355 / 422
Referenced in: [show references]