On Thu, 17 Feb 2011 00:05:15 +0100, Andrej Mitrovic wrote:
> On 2/16/11, jam wrote:
>>
>> import std.stdio,std.algorithm,std.range,std.container;
>>
>> void main()
>> {
>> auto a = [5,1,2,3,4,5,1];
>> auto index = countUntil(retro(a),5)
On Wed, 16 Feb 2011 22:00:13 +0100, Andrej Mitrovic wrote:
> On 2/16/11, jam wrote:
>> void main()
>> {
>> auto a = [5,1,2,3,4,5,1];
>> auto index = countUntil(retro(a),5);
>> writeln(a[a.length-1-index .. a.length]);
>> }
>>
>>
On Wed, 16 Feb 2011 20:24:36 +0100, Andrej Mitrovic wrote:
> The only thing I could come up with is exhausting the entire range to
> get the length of a bidirectional range. But that's inefficient. Anyway
> here's the dull thing:
>
> import std.stdio;
> import std.range;
> import std.array;
>
>
On Tue, 15 Feb 2011 09:00:54 -0500, Steven Schveighoffer wrote:
> On Mon, 14 Feb 2011 21:18:39 -0500, jam wrote:
>
>> Hi all,
>>
>> Just curious as to the difference in the built-in variable length array
>> vs. the std.container.Array and fixed length arrays whe
Hi all,
Just curious as to the difference in the built-in variable length
array vs. the std.container.Array and fixed length arrays when it
comes to using them in functions that take Ranges.
For instance the following does not compile:
import std.algorithm;
import std.stdio;
import std.range;
im