Creating Observables
This chapter is all about Reactive Extensions, so let's go ahead and create a project called rx-playground
that we will be using in our exploratory tour. We will use RxClojure (see https://github.com/ReactiveX/RxClojure), a library that provides Clojure bindings for RxJava()
(see https://github.com/ReactiveX/RxJava):
$ lein new rx-playground
Open the project file and add a dependency on RxJava's Clojure bindings:
(defproject rx-playground "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[io.reactivex/rxclojure "1.0.0"]])"]])
Now, fire up a REPL in the project's root directory so that we can start creating some observables:
$ lein repl
The first thing we need to do is import...