Libraryless. Click here for Pure Java version (2474L/16K).
1 | static <A> bool subListStartingAtIs(L<A> l, int i, A... items) {
|
2 | if (i < 0 || i+l(items) > l(l)) false; |
3 | for j over items: |
4 | if (!eq(l.get(i+j), items[j])) |
5 | false; |
6 | true; |
7 | } |
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
| Snippet ID: | #1027948 |
| Snippet name: | subListStartingAtIs |
| Eternal ID of this version: | #1027948/1 |
| Text MD5: | 150a1377ae65db9409cae565e43c2d81 |
| Transpilation MD5: | 70b05ed0bed1b4c52c57cc2377d561c6 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-04-20 13:18:13 |
| Source code size: | 189 bytes / 7 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 360 / 486 |
| Referenced in: | [show references] |