Libraryless. Click here for Pure Java version (3212L/18K).
1 | static <A> L<A> dropAfter(A a, L<A> l) { |
2 | int n = l(l); |
3 | for i to n: |
4 | if (eq(a, l.get(i))) |
5 | ret takeFirst(l, i); |
6 | ret l; |
7 | } |
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx
No comments. add comment
Snippet ID: | #1032387 |
Snippet name: | dropAfter |
Eternal ID of this version: | #1032387/1 |
Text MD5: | 439f84f7086f0de95362dc6d5b86c619 |
Transpilation MD5: | 48ff09490d09ecb22fdc566bf3f851ed |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-09-02 04:36:29 |
Source code size: | 139 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 157 / 216 |
Referenced in: | [show references] |