Error in 'The D Programming Language' (2010)?

2016-01-11 Thread asdfa via Digitalmars-d-learn
I have copied more or less verbatim an example from The D Programming Language, under 1.4.3 Counting Frequencies. Lambda Functions This is the code import std.stdio, std.string; void main() { uint[string] freqs; // Compute counts foreach (line; stdin.byLine()) { foreach

Re: Error in 'The D Programming Language' (2010)?

2016-01-11 Thread asdfa via Digitalmars-d-learn
On Tuesday, 12 January 2016 at 00:36:15 UTC, Ali Çehreli wrote: On 01/11/2016 04:28 PM, asdfa wrote: > Both DMD and GDC complain, saying > Error: template instance sort!((a, b) > { > return freqs[a] > freqs[b]; > } > ) template 'sort' is not defined That issue is already in the errata: