Libraryless. Click here for Pure Java version (2527L/16K).
1 | static <A> L<A> padList(L<A> l, int w, A a default null) { |
2 | if (l(l) >= w) ret l; |
3 | L<A> x = cloneList(l); |
4 | while (l(x) < w) x.add(a); |
5 | ret x; |
6 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1001988 |
Snippet name: | padList |
Eternal ID of this version: | #1001988/2 |
Text MD5: | fd4f017c77d9edea47468669f51ae326 |
Transpilation MD5: | a9017da406bce1a4237329161b81cd7c |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-12-05 17:31:35 |
Source code size: | 152 bytes / 6 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 649 / 1136 |
Version history: | 1 change(s) |
Referenced in: | [show references] |