|
|
|
|
|
by stianhoiland
85 days ago
|
|
This bothered me too. The author even said: > Now, let's say we want to make a small change: show the output in the original file order. In Clojure, this is fairly straightforward: store an ordered sequence of the words in word_seq, store a map from each word to its frequency in freq_map, iterate over the sequence, and look up each word in the map: Emphasis on just "storing" something. The author seems to not understand that this change makes the solutions categorically different. It's a little like critiquing the efficiency of moving a piano up a stairwell by saying why didn't they just use a crane via the window? Using a crane isn't a better way of getting a piano up the stairwell. |
|