Imminent – a composable futures library for Clojure
In the past few months, I have been working on an open source library that aims to fix the previous issues with Clojure futures. The result of this work is called imminent (see https://github.com/leonardoborges/imminent).
The fundamental difference is that imminent futures are asynchronous by default and provide a number of combinators that allow us to declaratively write our programs without having to worry about its order of execution.
The best way to demonstrate how the library works is to rewrite the previous movies example in it. We will do this in two steps.
First, we will examine individually the bits of imminent's API that will be part of our final solution. Then, we'll put it all together in a working application. Let's start by creating a new project:
lein new imminent-playground
Next, add a dependency on imminent to your project.clj
:
:dependencies [[org.clojure/clojure "1.6.0"] [com.leonardoborges/imminent "0.1.0"...