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   

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

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: 216 / 255
Version history: 2 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1009546 & http://1009546.tinybrain.de