Libraryless. Click here for Pure Java version (2728L/16K).
1 | static <A> LPair<A> paramsToPairs(A... params) { |
2 | if (l(params) == 1 && params[0] instanceof Map) |
3 | ret mapToPairs((Map) params[0]); |
4 | |
5 | LPair<A> l = emptyList(l(params)/2); |
6 | for (int i = 0; i+1 < l(params); i += 2) |
7 | l.add(pair(params[i], params[i+1])); |
8 | ret l; |
9 | } |
download show line numbers debug dex old transpilations
Travelled to 12 computer(s): bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1019464 |
Snippet name: | paramsToPairs |
Eternal ID of this version: | #1019464/7 |
Text MD5: | 5ff8f35c5d81a79a5710ba871f618b09 |
Transpilation MD5: | db0b699f6f0b6bd80a01f3cea766f729 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-04-19 15:50:29 |
Source code size: | 278 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 336 / 424 |
Version history: | 6 change(s) |
Referenced in: | [show references] |