(extend-vector-like cls {:keys [read write] :as opts})
sets the fields of an object with keyword
(extend-vector-like test.Cat {:read (fn [x] (seq (.getName x))) :write (fn [arr] (test.Cat. (apply str arr)))})
(test.Cat. "spike") ;=> #test.Cat(\s \p \i \k \e)
sets the fields of an object with keyword (extend-vector-like test.Cat {:read (fn [x] (seq (.getName x))) :write (fn [arr] (test.Cat. (apply str arr)))}) (test.Cat. "spike") ;=> #test.Cat(\s \p \i \k \e)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close