Re: chunkBy array at compile time

2018-12-19 Thread H. S. Teoh via Digitalmars-d-learn
On Wed, Dec 19, 2018 at 02:01:28PM -0500, Steven Schveighoffer via Digitalmars-d-learn wrote: > On 12/19/18 1:30 PM, H. S. Teoh wrote: [...] > > For CTFE, though, we don't really care about calling popFront twice, > > so I surmise that we should be able to just use the original > > non-RefCounted

Re: chunkBy array at compile time

2018-12-19 Thread Steven Schveighoffer via Digitalmars-d-learn
On 12/19/18 1:30 PM, H. S. Teoh wrote: On Wed, Dec 19, 2018 at 01:19:28PM -0500, Steven Schveighoffer via Digitalmars-d-learn wrote: On 12/19/18 12:20 PM, H. S. Teoh wrote: [...] It was originally a simple wrapper when I first submitted it, but Andrei requested to use RefCounted in order to w

Re: chunkBy array at compile time

2018-12-19 Thread H. S. Teoh via Digitalmars-d-learn
On Wed, Dec 19, 2018 at 01:19:28PM -0500, Steven Schveighoffer via Digitalmars-d-learn wrote: > On 12/19/18 12:20 PM, H. S. Teoh wrote: [...] > > It was originally a simple wrapper when I first submitted it, but > > Andrei requested to use RefCounted in order to work around the > > subrange traver

Re: chunkBy array at compile time

2018-12-19 Thread Steven Schveighoffer via Digitalmars-d-learn
On 12/19/18 12:20 PM, H. S. Teoh wrote: On Wed, Dec 19, 2018 at 10:38:06AM -0500, Steven Schveighoffer via Digitalmars-d-learn wrote: [...] Looking at the code for chunkBy, it seems to me that the implementation is quite complex for what in my head should be a simple wrapper... [...] It was o

Re: chunkBy array at compile time

2018-12-19 Thread H. S. Teoh via Digitalmars-d-learn
On Wed, Dec 19, 2018 at 10:38:06AM -0500, Steven Schveighoffer via Digitalmars-d-learn wrote: [...] > Looking at the code for chunkBy, it seems to me that the > implementation is quite complex for what in my head should be a simple > wrapper... [...] It was originally a simple wrapper when I firs

Re: chunkBy array at compile time

2018-12-19 Thread Steven Schveighoffer via Digitalmars-d-learn
On 12/19/18 3:20 AM, Andrey wrote: Hi, I have got this code: import std.array : array; import std.algorithm.mutation; import std.algorithm.iteration; import std.stdio; void main() {     string input = "sieviaghp";     enum data = ["emo", "emoze", "emow", "emuo", "evuo", "ete", "ie", "vuo", "si

chunkBy array at compile time

2018-12-19 Thread Andrey via Digitalmars-d-learn
Hi, I have got this code: import std.array : array; import std.algorithm.mutation; import std.algorithm.iteration; import std.stdio; void main() { string input = "sieviaghp"; enum data = ["emo", "emoze", "emow", "emuo", "evuo", "ete", "ie", "vuo", "sie", "w"]; enum index = 3;