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

11
LINES

< > BotCompany Repo | #1008382 // pairMap - apply function to both elements of a pair

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

Transpiled version (1571L) is out of date.

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

download  show line numbers  debug dex  old transpilations   

Travelled to 16 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, whxojlpjdney, wnsclhtenguj, xrpafgyirdlv

No comments. add comment

Snippet ID: #1008382
Snippet name: pairMap - apply function to both elements of a pair
Eternal ID of this version: #1008382/4
Text MD5: f9189e7ff39dd6746c34f2ec8ab6bcf3
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-06-14 17:06:47
Source code size: 296 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 562 / 693
Version history: 3 change(s)
Referenced in: [show references]