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

26
LINES

< > BotCompany Repo | #1008543 - mapToLines - different meanings

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2431L/16K).

static L<S> mapToLines(Map map) {
  new L<S> l;
  for (O key : keys(map))
    l.add(str(key) + " = " + str(map.get(key)));
  ret l;
}

sS mapToLines(Map map, O f) {
  ret lines(map(map, f));
}

sS mapLike mapToLines(O f, Map map) {
  ret lines(map(map, f));
}

sS mapLike mapToLines(O f, Iterable l) {
  ret lines(map(f, l));
}

static <A> S mapToLines(Iterable<A> l, IF1<A, S> f) {
  ret mapToLines(f, l);
}

static <A, B> S mapToLines(Map<A, B> map, IF2<A, B, S> f) {
  ret lines(map(map, f));
}

download  show line numbers  debug dex   

Travelled to 10 computer(s): aoiabmzegqzx, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, tslmcundralx, tvejysmllsmz, whxojlpjdney

No comments. add comment

Snippet ID: #1008543
Snippet name: mapToLines - different meanings
Eternal ID of this version: #1008543/7
Text MD5: b43a91ae56741539d1280997de73117a
Transpilation MD5: 075c6da772a8142a00daa21cc3c2953b
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-11-27 19:04:41
Source code size: 522 bytes / 26 lines
Pitched / IR pitched: No / No
Views / Downloads: 324 / 379
Version history: 6 change(s)
Referenced in: [show references]

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