Last active
April 22, 2021 14:41
-
-
Save frenata/3b3ba21f084479d24a0615274f7a3aab to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require '[clojure.string :as str]) | |
(defn freq [s] (-> s str/lower-case (str/replace #"\s" "") frequencies)) | |
(defn occurs [s c] ((freq s) c)) | |
(occurs "Hello World" \h) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment