On Monday, February 06, 2017 17:48:28 Dmitry via Digitalmars-d-learn wrote: > On Monday, 6 February 2017 at 17:35:02 UTC, Jonathan M Davis > > wrote: > > You have to import std.range to use groupBy. > > Of course, "import std.range" already done.
Hmm. Well, the error your getting typically is the error you get when you're missing an import, and I did a quick grep of phobos and saw that groupBy was in std.range, which is why I told you to import std.range. Looking at groupBy more closely now, it's part of SortedRange rather than being a free function, and it doesn't take a predicate. So, I don't know why the Rosetta code example is doing what it's doing. It doesn't match anything that's currently in Phobos. - Jonathan M Davis