[Issue 23755] array.until!pred should return an array
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Apr 12 14:06:32 UTC 2024
https://issues.dlang.org/show_bug.cgi?id=23755
Ate Eskola <Ajieskola at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |Ajieskola at gmail.com
Resolution|--- |INVALID
--- Comment #1 from Ate Eskola <Ajieskola at gmail.com> ---
Nope. `until` is a lazy algorithm and it says it in it's documentation. To
return an array, it would have to work eagerly and therefore break it's
performance assumptions.
You can get a slice without copying it with `findSplitBefore`.
--
More information about the Digitalmars-d-bugs
mailing list