Summary: Make .byValue() and .byKey() of associative arrays
                    adopt the input range interface.
           Product: D
           Version: D2
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: druntime

--- Comment #0 from 2010-08-09 10:26:46 PDT ---
Currently .byValue() and .byKey() returns a delegate. This make it only
iterable by foreach, but cannot be used in std.algorithm algorithms, e.g.


import std.algorithm;
import std.stdio;
void main () {
   auto x = ["a":4, "b":6];
   writeln( reduce!"a+b"( map!"a*a"( x.byValue() ) ) );


While it is possible to use .values and .keys, both of these create a copy of
the array, which is unnecessary for many codes like the one above.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to