O'Reilly logo

Clojure Reactive Programming by Leonardo Borges

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Removing incidental complexity with RxClojure

In Chapter 2, A Look at Reactive Extensions, we learned about the basic building blocks of RxClojure, an open-source CES framework. In this section, we'll use this knowledge in order to remove the incidental complexity from our program. This will give us a clear, declarative way to display both prices and rolling averages.

The UI code we've written so far remains unchanged, but we need to make sure RxClojure is declared in the dependencies section of our project.clj file:

[io.reactivex/rxclojure "1.0.0"]

Then, ensure we require the following library:

(ns stock-market-monitor.core (:require [rx.lang.clojure.core :as rx] [seesaw.core :refer :all]) (:import (java.util.concurrent TimeUnit) (rx Observable))) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required