Skip to content

Instantly share code, notes, and snippets.

@theotherzach
Last active August 29, 2015 14:13
Show Gist options
  • Select an option

  • Save theotherzach/18550d52e7fa4743f4aa to your computer and use it in GitHub Desktop.

Select an option

Save theotherzach/18550d52e7fa4743f4aa to your computer and use it in GitHub Desktop.
(def scenes [{:subject "Frankie"
:action "say"
:object "relax"}
{:subject "Lucy"
:action "❤s"
:object "Clojure"}
{:subject "Rich"
:action "tries"
:object "a new conditioner"}])
(defn people-in-scenes [scenes]
(->> scenes
(map :bad-key) ;; <- nil is introduced here
(interpose ", ")
(reduce str)))
(println "People:" (people-in-scenes scenes))
;;=> People: , ,
;;=> nil
@theotherzach
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment