(def salutation {:male "Mr"
:female "Ms"
:other "dear"})
(defn user [first-name last-name gender]
{:full-name (str first-name " " last-name)
:salutation (salutation gender)})
(defn build-notifications [announcement users]
(map #(str "Hello " (:salutation %) " " (:full-name %) ", " announcement) users))
(def build-upgrade-notifications (partial build-notifications "We have an excitement upgrade for you!"))
(def users [(user "John" "Doe" :male)
(user "Jane" "Smith" :female)
(user "Noah" "Jhonson" :other)])
(run! println (build-upgrade-notifications users))
To embed this project on your website, copy the following code and paste it into your website's HTML: