Hello All,
I am learning mount library in Clojure GitHub - tolitius/mount: managing Clojure and ClojureScript app state since (reset) . This is my code:
(ns mount-example.foo
(:require [mount.core :refer [defstate start stop]]))
;;=> nil
(defstate a
:start 42
:stop (println "Configuration cleared."))
;;=> #'mount-example.foo/a
(start)
;;=> Execution error (ClassCastException) at mount-example.core/eval491$fn (core.clj:20).
;; class clojure.lang.PersistentArrayMap cannot be cast to class java.util.concurrent.Future (clojure.lang.PersistentArrayMap is in unnamed module of loader 'app'; java.util.concurrent.Future is in module java.base of loader 'bootstrap')
;;
(stop)
I am not sure why I am getting the error above. Would be great if someone throws light upon it.
Thanks in advance.