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

13
LINES

< > BotCompany Repo | #1024034 // paramsWithSameKey

JavaX fragment (include)

static O[] mapMethodLike paramsWithSameKey(O key, Cl values) {
  ret paramsWithSameKey(key, asObjectArray(values));
}

static O[] paramsWithSameKey(O key, O... values) {
  int n = l(values);
  O[] o = new O[n*2];
  for i to n: {
    o[i*2] = key;
    o[i*2+1] = values[i];
  }
  ret o;
}

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: 192 / 243
Version history: 3 change(s)
Referenced in: [show references]