> > user> (path-rebind nested-structure [:nested1 :nested2 :final-data]
> > "new data")
> > {:nested1 {:nested2 {:final-data "new data", :level 2}, :level
> > 1}, :level 0}
>
> Congratulations, you've implemented 'assoc-in'  :-)
>
> user=> (assoc-in nested-structure [:nested1 :nested2 :final-data] "new data")
> {:nested1 {:nested2 {:level 2, :final-data "new data"}, :level 1}, :level 0}
>
> There are also 'get-in' and 'update-in'.
>
> Your code looks fine -- nearly identical to 'assoc-in' in fact.  It
> does the destructuring right in the function arguments, but everything
> else is merely stylistic differences.
>
> --Chouser

ahh even better...   I knew someone must have done this before.... and
it kills me now to look at the API and see it right underneath the
(assoc) description.   I have no idea how I missed it.

thanks,
daniel
--~--~---------~--~----~------------~-------~--~----~
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
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to