Liking cljdoc? Tell your friends :D
Clojure only.

hara.object.framework.vector-like


extend-vector-likecljmacro

(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)
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close