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

11
LINES

< > BotCompany Repo | #1024766 // pairMapB - apply function to second element of a pair

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

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

1  
static Pair pairMapB(O f, Pair p) {
2  
  ret p == null ? null : pair(p.a, callF(f, p.b));
3  
}
4  
5  
static <A, B, C> Pair<A, C> lambdaMapLike pairMapB(IF1<B, C> f, Pair<A, B> p) {
6  
  ret p == null ? null : pair(p.a, f.get(p.b));
7  
}
8  
9  
static Pair pairMapB(Pair p, O f) {
10  
  ret pairMap(f, p);
11  
}

Author comment

Began life as a copy of #1008382

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1024766
Snippet name: pairMapB - apply function to second element of a pair
Eternal ID of this version: #1024766/5
Text MD5: 68c1b64781b9bf16d3fc09ec552e9304
Transpilation MD5: 74ef91a8996144fdc910fb5d06795502
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-05-25 17:39:17
Source code size: 291 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 259 / 372
Version history: 4 change(s)
Referenced in: [show references]