fork download
  1. import std.stdio, std.string, std.algorithm;
  2.  
  3. void main(){
  4. uint[string] freqs;
  5. foreach(line; stdin.byLine()){
  6. foreach(word; splitter(strip(line))){
  7. ++freqs[word.idup];
  8. }
  9. }
  10.  
  11. foreach(key, value; freqs){
  12. writefln("%6u\t%s", value, key);
  13. }
  14. }
Success #stdin #stdout 0.01s 2104KB
stdin
Standard input is empty
stdout
Standard output is empty