Green Eggs and Transducers
A quick tour of Clojure Transducers with core.async with Dr. Seuss as a guide. Follow along at home by: lein new green-eggs modify your project.clj to include the following: (defproject green-eggs "0.1.0-SNAPSHOT" :description "try them" :url "http://en.wikipedia.org/wiki/Green_Eggs_and_Ham" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :dependencies [[org.clojure/clojure "1.7.0-alpha1"] [org.clojure/core.async "0.1.338.0-5c5012-alpha"]]) Start up a repl and hack in! Green Eggs and Ham Transducers are a new feature of Clojure 1.7. Instead of trying to explain them with words, let’s take a look of them in action. First we need some data. Let’s def a vector of all the places you could try green eggs and ham. ...