[Issue 24589] New: [std.sreaching] take functions seem to be missing range overload/version
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jun 5 22:35:24 UTC 2024
https://issues.dlang.org/show_bug.cgi?id=24589
Issue ID: 24589
Summary: [std.sreaching] take functions seem to be missing
range overload/version
Product: D
Version: D2
Hardware: All
URL: http://dlang.org/phobos/
OS: All
Status: NEW
Severity: enhancement
Priority: P3
Component: phobos
Assignee: nobody at puremagic.com
Reporter: crazymonkyyy at gmail.com
```
import std;
auto takeUntil(R)(R base,R other){
static struct Result{
R base;
R other;
alias base this;
bool empty()=>base==other;
}
return Result(base,other);
}
unittest{
iota(5).takeUntil(iota(5).drop(3)).writeln;
}
```
--
More information about the Digitalmars-d-bugs
mailing list