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

13
LINES

< > BotCompany Repo | #1024034 // paramsWithSameKey

JavaX fragment (include)

1  
static O[] mapMethodLike paramsWithSameKey(O key, Cl values) {
2  
  ret paramsWithSameKey(key, asObjectArray(values));
3  
}
4  
5  
static O[] paramsWithSameKey(O key, O... values) {
6  
  int n = l(values);
7  
  O[] o = new O[n*2];
8  
  for i to n: {
9  
    o[i*2] = key;
10  
    o[i*2+1] = values[i];
11  
  }
12  
  ret o;
13  
}

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: #1024034
Snippet name: paramsWithSameKey
Eternal ID of this version: #1024034/4
Text MD5: 2f409c58838e3a4eefe2e390f754ce24
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-08-31 22:20:47
Source code size: 299 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 273 / 328
Version history: 3 change(s)
Referenced in: [show references]