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

30
LINES

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

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

Transpiled version (2431L) is out of date.

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((O) f, l);
}

static <A> S mapToLines(IF1<A, S> f, Iterable<A> l) {
  ret mapToLines((O) 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 11 computer(s): aoiabmzegqzx, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, tslmcundralx, tvejysmllsmz, whxojlpjdney, xrpafgyirdlv

No comments. add comment

Snippet ID: #1008543
Snippet name: mapToLines - different meanings
Eternal ID of this version: #1008543/8
Text MD5: 6f1587f9847de3f1c7d54fb2aa36c5d1
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-02-21 14:13:59
Source code size: 615 bytes / 30 lines
Pitched / IR pitched: No / No
Views / Downloads: 335 / 393
Version history: 7 change(s)
Referenced in: [show references]

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