1 | static <A> L<A> dropFirstAndLast(int n, L<A> l) { |
2 | ret cloneSubList(l, n, l(l)-n); |
3 | } |
4 | |
5 | static <A> L<A> dropFirstAndLast(int m, int n, L<A> l) { |
6 | ret cloneSubList(l, m, l(l)-n); |
7 | } |
8 | |
9 | static <A> L<A> dropFirstAndLast(L<A> l) { |
10 | return dropFirstAndLast(1, l); |
11 | } |
12 | |
13 | static S dropFirstAndLast(S s) { |
14 | ret substring(s, 1, l(s)-1); |
15 | } |
Began life as a copy of #1000798
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1005094 |
Snippet name: | dropFirstAndLast function (drop n first and n last elements of list or string, makes new ArrayList) |
Eternal ID of this version: | #1005094/5 |
Text MD5: | 91ca9eda9d4817b7a167c837276454e4 |
Author: | stefan |
Category: | |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-10-12 18:09:57 |
Source code size: | 339 bytes / 15 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 640 / 645 |
Version history: | 4 change(s) |
Referenced in: | [show references] |