Re: Accessing Record Constructors

2013-07-31 Thread JvJ
I figured it out. I assumed it was some quirk with defrecord, but it was an arity exception. Didn't pass 2 params to the ctor. DERP! ;; This is the right way: (Vec2. (+ (:x this) (:x other)) (+ (:y this) (:y other))) On Wednesday, 31 July 2013 17:51:36 UTC-7, JvJ wrote: > > I tried

Re: Accessing Record Constructors

2013-07-31 Thread Armando Blancas
The constructor should be available, like in this contrived sample: Clojure 1.5.1 user=> (deftype Foo [a] Object (toString [this] (Foo. 1))) user.Foo What error are you getting? On Wednesday, July 31, 2013 5:51:36 PM UTC-7, JvJ wrote: > > I tried to define this record, but the Vec2. constructor