1 | static <A> A reverseGet(L<A> l, int idx) { |
2 | if (l == null || idx < 0) null; |
3 | int n = l(l); |
4 | ret idx < n ? l.get(n-1-idx) : null; |
5 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1018000 |
Snippet name: | reverseGet - get from end of list |
Eternal ID of this version: | #1018000/1 |
Text MD5: | 7ecc995fc76af750beefea614bb892ef |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-08-25 11:36:05 |
Source code size: | 137 bytes / 5 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 434 / 478 |
Referenced in: | [show references] |