Still within our imminent-playground project, open the src/imminent_playground/core.clj file and add the appropriate definitions:
(ns imminent-playground.core (:require [clojure.pprint :refer [pprint]] [imminent.core :as i])) (def movie ...) (def actor-movies ...) (def actor-spouse ...) (def top-5-movies ...)
We will be using the same data as in the previous program, which is represented in the preceding snippet by the use of ellipses. Simply copy the relevant declarations over.
The service functions will need small tweaks in this new version:
(defn cast-by-movie [name] (i/future (do (Thread/sleep 5000) (:cast movie)))) (defn movies-by-actor [name] (i/future (do (Thread/sleep 2000) (->> actor-movies (filter #(= ...