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

10
LINES

< > BotCompany Repo | #1009546 // numberedLines

JavaX fragment (include)

1  
static S numberedLines(Map map) {
2  
  ret numberedLines(mapToLines(map));
3  
}
4  
5  
static <A> S numberedLines(Collection<A> l) {
6  
  int i = 0;
7  
  new L<S> lines;
8  
  if (l != null) for (A a : l) lines.add(((++i) + ". " + str(a)));
9  
  ret lines(lines);
10  
}

Author comment

Began life as a copy of #1007684

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: #1009546
Snippet name: numberedLines
Eternal ID of this version: #1009546/3
Text MD5: 9f33c77c1beb29377e0dc2db8c715296
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-09-05 13:52:54
Source code size: 249 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 444 / 510
Version history: 2 change(s)
Referenced in: [show references]