June 05 [Issue 24589] New: [std.sreaching] take functions seem to be missing range overload/version | ||||
---|---|---|---|---|
| ||||
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@puremagic.com Reporter: crazymonkyyy@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; } ``` -- |
Copyright © 1999-2021 by the D Language Foundation