Slide 161
Slide 161 text
(require '[clojure.string :as str])
(def text "Any programming language can be
divided into two parts: some set of
fundamental operators that play the role of
axioms, and the rest of the language, which
could in principle be written in terms of
these fundamental operators.\n")
(def sep #"[\p{Space}|\p{Punct}]+")
(->> (str/split text sep)
(map count)
frequencies)
➠
{7 2, 4 6, 6 1, 3 8, 2 8, 11 3, 9 3, 5 5, 8 2}