On Monday, 2 October 2023 at 06:19:29 UTC, Imperatorn wrote:
On Monday, 2 October 2023 at 02:47:37 UTC, Joel wrote:```d import std;auto data=“I went for a walk, and fell down a hole.”;You can improve it further by inlining ```d import std; auto data = "I went for a walk, and fell down a hole."; void main(string[] args) { int[string] dic; data.split(' ').each!(w => dic[w]++); sort(dic.keys).each!(w => writeln(dic[w], " ",w)); } ```
I want the output sorted by value.