https://issues.dlang.org/show_bug.cgi?id=7361

Nick Treleaven <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #5 from Nick Treleaven <[email protected]> ---
While it's not documented in the spec, this feature is already documented in an
example in std.range.enumerate:

http://dlang.org/phobos/std_range.html#.enumerate

    foreach (lineNum, line; stdin.byLine().enumerate(1))
        stdout.writefln("line #%s: %s", lineNum, line);

--

Reply via email to