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

7
LINES

< > BotCompany Repo | #1014419 // printIterate - iterate and print each element as it is retrieved

JavaX fragment (include)

static <A> IterableIterator<A> printIterate(Iterable<A> it) {
  final Iterator<A> i = iterator(it);
  ret iff(func -> O {
    if (!i.hasNext()) ret endMarker();
    ret print(i.next());
  });
}

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: #1014419
Snippet name: printIterate - iterate and print each element as it is retrieved
Eternal ID of this version: #1014419/2
Text MD5: 3b8e84c61f4eb41ec8e8749ba38bca08
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-04-21 17:06:01
Source code size: 199 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 382 / 418
Version history: 1 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1014449 - printIterate_nl - iterate and print each element as it is retrieved - prints a new line before each element
#1019088 - iterate_printProgress - iterate and print progress count