At 11:36 you could have piped into Kernel.//2 instead of the shorthand or extra function. Every arithmetic expression can be substituted using Kernel functions (they are Guards in the docs)
@jsteezy8821 сағат бұрын
Your top_five function only sorts by the first value in the tuple, which are the words and not the actual frequencies. Should be something like this, not sure how to do shorthand: ``` defp top_five(word_frequencies) do Enum.sort_by(word_frequencies, fn {_, value} -> value end, :desc) |> Enum.take(5) end ``` Great videos, BTW!