nope, there is somewhere a error in the example. When I copie it as you made it then I see this error message : RuntimeException Unmatched delimiter: } clojure.lang.Util.runtimeException (Util.java:219) when I add a extra ) I see this message : RuntimeException Map literal must contain an even number of forms clojure.lang.Util.runtimeException (Util.java:219)
Roelof Op maandag 27 oktober 2014 20:46:49 UTC+1 schreef James Reeves: > On 27 October 2014 19:37, Roelof Wobben <rwo...@hotmail.com <javascript:>> > wrote: > >> of course I can. >> >> If I look at answers other people gives then this is the solution : >> >> (defn old-book->new-book [book] >> (assoc book :authors (set (book :authors))) >> ) >> >> and then according to the explanation I would see this output ; >> >> (old-book->new-book {:title "Wild Seed", :authors [octavia]});=> {:title >> "Wild Seed", :authors #{octavia}} >> >> but on 1.6.0 and on 1.5.1 I see another output as discussed here. >> >> > I don't think you're understanding that: > > {:title "Wild Seed", :authors #{{:name "Octavia E. Butler", :birth-year 1947, > :death-year 2006}}} > > Evaluates to the same thing as: > > {:title "Wild Seed", :authors #{octavia}} > > The difference is that in the first value, "octavia" has been replaced > with its value. > > You can confirm the two data structures are the same by checking their > equality: > > (= {:title "Wild Seed", :authors #{{:name "Octavia E. Butler", :birth-year > 1947, :death-year 2006}} > {:title "Wild Seed", :authors #{octavia}}} > > This should return true. > > - James > -- 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.