Re: Private member variables for deftype

2017-03-10 Thread Alex Miller
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 > :

Private member variables for deftype

2017-03-10 Thread 'Tianxiang Xiong' via Clojure
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 : (let [ctx (atom nil) kv-store (atom nil)] (reify Processor ;; ... (in