Make a hash out of two ranges

Andrej Mitrovic andrej.mitrovich at gmail.com
Wed Feb 27 19:56:48 PST 2013


import std.algorithm;
import std.range;

void main()
{
    auto r = map!((a, b) => [a : b])(["foo"], ["bar"]);  // error
    assert(r.front == ["foo" : "bar"]);
}

This doesn't compile, what am I missing?


More information about the Digitalmars-d-learn mailing list