1 | static <A> L<A> dropNullsAtEnd(L<A> l) { |
2 | int i = l(l); |
3 | while (i > 0 && l.get(i-1) == null) --i; |
4 | ret takeFirst(l, i); |
5 | } |
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: | #1019580 |
Snippet name: | dropNullsAtEnd |
Eternal ID of this version: | #1019580/1 |
Text MD5: | 7af9e30299a6fe8d778eadf746552dae |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-11-12 22:54:40 |
Source code size: | 128 bytes / 5 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 310 / 359 |
Referenced in: | [show references] |