Jacob Carlborg
2012-07-09 20:09:54 UTC
Almost every time I'm trying to use std.algorithm I run into some kind
of error, for what seems to be fairly trivial and what one would expect
to work. It feels like I'm constantly fighting with std.algorithm. For
example:
import std.algorithm;
import std.range;
struct Foo {}
auto f = Foo();
auto foos = [f];
auto foo = foos.map!(x => "foo");
auto bar = foo.chain("bar");
This simple example result in the follow error:
http://pastebin.com/E4LV2UBE
Another example:
auto str = ["foo", "bar"].map!(x => x);
auto f = str.sort();
Results in:
http://pastebin.com/BeePWQk9
I'm using DMD 2.059.
of error, for what seems to be fairly trivial and what one would expect
to work. It feels like I'm constantly fighting with std.algorithm. For
example:
import std.algorithm;
import std.range;
struct Foo {}
auto f = Foo();
auto foos = [f];
auto foo = foos.map!(x => "foo");
auto bar = foo.chain("bar");
This simple example result in the follow error:
http://pastebin.com/E4LV2UBE
Another example:
auto str = ["foo", "bar"].map!(x => x);
auto f = str.sort();
Results in:
http://pastebin.com/BeePWQk9
I'm using DMD 2.059.
--
/Jacob Carlborg
/Jacob Carlborg