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).

static <A> IterableIterator<L<A>> listPrefixes_notEmpty_rev(fL<A> l) {
  ret iff(new F0 {
    int i = l(l);
    
    public O get() {
      if (i <= 0) ret endMarker();
      ret cloneSubList(l, 0, i--);
    }
  });
}

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: 354 / 419
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1017045 - sentencePrefixes_notEmpty_rev