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

9
LINES

< > BotCompany Repo | #1017666 // mapPairB_pcall - apply function to second element of each pair

JavaX fragment (include)

static <A, B, C> L<Pair<A, C>> mapPairB_pcall(fO f, Iterable<Pair<A, B>> l) {
  ret map_pcall(l, func(Pair<A, B> p) -> Pair<A, C> {
    p == null ? null : pair(p.a, (C) callF(f, p.b))
  });
}

static <A, B, C> L<Pair<A, C>> mapPairB_pcall(final F1<B, C> f, Iterable<Pair<A, B>> l) {
  ret mapPairB_pcall((O) f, l);
}

Author comment

Began life as a copy of #1016965

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: #1017666
Snippet name: mapPairB_pcall - apply function to second element of each pair
Eternal ID of this version: #1017666/1
Text MD5: 3300eec8beac3c6595cf8b5ab153b0be
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-07-31 19:37:13
Source code size: 324 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 295 / 340
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)