No. On Friday, March 10, 2017 at 5:14:09 PM UTC-6, Tianxiang Xiong wrote: > > Is there a way of giving a type defined with `deftype` internal member > variables? E.g. not passed explicitly in the constructor. > > With `reify`, we can use a closure > <http://stackoverflow.com/a/41197353/864684>: > > (let [ctx (atom nil) > kv-store (atom nil)] > (reify Processor > ;; ... > (init [this context] > (reset! ctx context) > (reset! kv-store (.getStateStore context "Counts"))) > ;; ... > )) > > It's not clear how this can be done with `deftype`, however. >
-- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.