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

14
LINES

< > BotCompany Repo | #1005537 // snippetsWithTitles - uses cached version of titles

JavaX fragment (include)

// A = S or Snippet
static <A> L<S> snippetsWithTitles(L<A> l) {
  ifclass Snippet
    if (first(l) instanceof Snippet)
      ret map snippetWithTitle_cached((L<Snippet>) l);
  endif
  L<S> ids = cast l;
  final SS map = getSnippetTitles_cached(ids);
  ret map(func(S id) -> S { fsI(id) + " - " + map.get(fsI(id)) }, ids);
}

static S snippetsWithTitles(S... ids) {
  ret join(", ", snippetsWithTitles(asList(ids)));
}

Author comment

Began life as a copy of #1004807

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1005537
Snippet name: snippetsWithTitles - uses cached version of titles
Eternal ID of this version: #1005537/7
Text MD5: ddfcb94531adc0af1b1dbdaefb616a96
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-12-18 14:00:39
Source code size: 431 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 526 / 543
Version history: 6 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)