Skip to content

Instantly share code, notes, and snippets.

@dbasch
Created January 9, 2014 23:02
Show Gist options
  • Save dbasch/8343768 to your computer and use it in GitHub Desktop.
Save dbasch/8343768 to your computer and use it in GitHub Desktop.
(defn transform
[words]
(->> words
(partition 2 1)
(reduce (fn [acc [w next-w]]
(update-in acc
[w next-w]
(fnil inc 0)))
{})))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment