I am unsure of your question then - what you pasted is correct.

On the linked page it shows a slightly different output: 
(old-book->new-book {:title "Wild Seed", :authors [octavia]})

;=> {:title "Wild Seed", :authors #{octavia}}


The "#{}" syntax is a literal set, that is all. It isn't rendering the 
contents of octavia, merely indicating that it is a set with a single item 
in, that item being the var octavia.

Maybe if you rephrase the question that might help?

On Monday, 27 October 2014 14:10:37 UTC, Roelof Wobben wrote:
>
> Nope, the exercise I stated this :  
>
> (old-book->new-book {:title "Wild Seed", :authors [octavia]})
>
>
> See exercise 22 on this page : 
> http://iloveponies.github.io/120-hour-epic-sax-marathon/structured-data.html#exercise-22
>
> Roelof
>
>
> Op maandag 27 oktober 2014 14:52:23 UTC+1 schreef Colin Yates:
>
>> (get book :authors) is saying "return the value of the ":authors" key in 
>> the "book" map. You provided {:title... :authors [octavia]} as the "book" 
>> map, the value of "authors" being a vector with a single element. That 
>> single element being "{:name "Octavia E. Butler"
>>
>>               :birth-year 1947
>>               :death-year 2006}"
>>
>>
>> In other words, it is all working correctly.
>>
>>
>> Did you mean (old-book->new-book {:title "Wild Seed", :authors (:name 
>> octavia)}) ?
>>
>>
>>
>> On Monday, 27 October 2014 13:45:45 UTC, Roelof Wobben wrote:
>>>
>>> Hello, 
>>>
>>> I have this "facts". 
>>>
>>> (def octavia {:name "Octavia E. Butler"
>>>               :birth-year 1947
>>>               :death-year 2006})
>>>
>>>
>>> (def wild-seed {:title "Wild Seed", :authors [octavia]})
>>>
>>>
>>>
>>> So I thought when I do this : 
>>>
>>>
>>> (defn old-book->new-book [book]
>>>    (get book :authors))
>>>
>>>
>>> (old-book->new-book {:title "Wild Seed", :authors [octavia]}) 
>>>
>>>
>>> I see this output :  [{:death-year 2006, :name "Octavia E. Butler", 
>>> :birth-year 1947}]      
>>>
>>> where I expected it to be octavia or octavia E. Butler  
>>>
>>>
>>> Can someone explain why I see the wrong output ?
>>>
>>>
>>> Roelof
>>>
>>>
>>>
>>>
>>> But I see this output : 
>>>
>>>

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

Reply via email to