Re: Mixin - to get to the content-type `MapResult!(__lambda1, int[]).MapResult`

2015-05-30 Thread Ali Çehreli via Digitalmars-d-learn
On 05/29/2015 06:07 PM, Dennis Ritchie wrote: Hi, This code prints the arrays: [5] [6] [7] import std.stdio, std.algorithm; static int idx; Do you want to share that for the first element of every two-element array or do you want to start from 0 for every range? void walk(R)(R

Mixin - to get to the content-type `MapResult!(__lambda1, int[]).MapResult`

2015-05-29 Thread Dennis Ritchie via Digitalmars-d-learn
Hi, This code prints the arrays: [5] [6] [7] import std.stdio, std.algorithm; static int idx; void walk(R)(R range) { while (!range.empty) { range.front; range.popFront; ++idx; } } void main() { [5, 6, 7].map!(a = [a].writeln).walk; } How should I apply