On this page:

Word Frequencies

For this homework set, you will design a Rust version of a word frequency counting program.

The objective of this homework is to deepen your knowledge of Rust’s iterators, traits, and data structures.

Deadline Send a tar bundle of the Cargo folder for freq to Dr. Tov by Friday 6 February NOON.


Your freq program consumes ASCII words from standard input. It prints a list of word-frequency counts to the standard output.

  $ cat > test.txt

  hello world,

  bye world

  $ ./freq < test.txt

  world: 2

  bye: 1

  hello: 1

You may wish to run your freq program on the bible used for Counting Words.