Libraryless. Click here for Pure Java version (10685L/58K).
static <A> L<A> takeUntil(Iterable<A> l, bool includeLast, IF1<A, Bool> pred) { new L<A> out; fOr (A a : l) if (pred.get(a)) { if (includeLast) out.add(a); ret out; } else out.add(a); ret out; }
Began life as a copy of #1033231
download show line numbers debug dex old transpilations
Travelled to 2 computer(s): elmgxqgtpvxh, mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1038791 |
| Snippet name: | takeUntil - take elements from iterable until one matches the predicate |
| Eternal ID of this version: | #1038791/3 |
| Text MD5: | 9c6e4b1151c033f743d5d3cd5eaeab92 |
| Transpilation MD5: | fef0e4230dac40b4c8af55a6ee880265 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2026-02-09 22:21:52 |
| Source code size: | 246 bytes / 11 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 48 / 76 |
| Version history: | 2 change(s) |
| Referenced in: | #761 - New #629 - Standard functions list (LIVE) - continued on #1006654 |