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

10
LINES

< > BotCompany Repo | #1009546 // numberedLines

JavaX fragment (include)

static S numberedLines(Map map) {
  ret numberedLines(mapToLines(map));
}

static <A> S numberedLines(Collection<A> l) {
  int i = 0;
  new L<S> lines;
  if (l != null) for (A a : l) lines.add(((++i) + ". " + str(a)));
  ret lines(lines);
}

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