Hmm I can't see to reproduce. ambrose@ambrose-VirtualBox:~$ lein repl nREPL server started on port 33367 REPL-y 0.1.0-beta10 Clojure 1.4.0 user=> (defprotocol Bar (update-position [this np])) Bar user=> (defrecord Foo [a b c] #_=> Bar #_=> (update-position [this np] (Foo. a np c))) user.Foo user=> (update-position (Foo. 1 2 3) 1) #user.Foo{:a 1, :b 1, :c 3} user=>
Thanks, Ambrose On Fri, Aug 24, 2012 at 6:32 PM, Jim - FooBar(); <jimpil1...@gmail.com>wrote: > Hi all, > > It seems that trying to instantiate a new record via its own methods > fails!!! example: > > (defrecord Foo [a b c] > Bar > (update-position [this np] (Foo. a np c))) > > No matching ctor found ! > > There must be a way to do this without going round and round in > functions... > > Jim > > -- > 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+unsubscribe@**googlegroups.com<clojure%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/**group/clojure?hl=en<http://groups.google.com/group/clojure?hl=en> > -- 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