Thanks - that might well be part of the solution

Person. is dynamically determined (i.e the result of a fn too)

So I guess I am asking is there a way to dynamically resolve a
classname?

I found this

http://dev.clojure.org/jira/browse/CLJ-370?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel

Does anyone know anything more about it, or where the sourcecode would
be?

On Feb 4, 2:44 am, Aaron Cohen <aa...@assonance.org> wrote:
> On Thu, Feb 3, 2011 at 9:36 PM, Quzanti <quza...@googlemail.com> wrote:
>
> > On Feb 4, 2:23 am, Kevin Downey <redc...@gmail.com> wrote:
>
> >> whole crazy concat thing
> >>                 which has nothing to do with anything
>
> > I probably should have clarified that the reason I need concat is that
> > various functions are returning subsets of the arguments as vectors,
> > but as stated to keep things simple in the example I just used values
>
> Were you aware that records support assoc (and as a side-effect,
> merge)? You end up with a new record as with all clojure immutable
> datastructures, but this is how you can build records up "a piece at a
> time".
>
> (defn complicated-function [params]
>    (let [p (Person. nil nil)
>          parammap (zipmap [:name :age] params)]
>         (merge p parammap)))
>
> user=> (complicated-function ["Aaron" 31])
> #:user.Person{:name "aaron", :age 31}
>
> --Aaron

-- 
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

Reply via email to