>         (swap! recent-activity concat feed @recent-activity)))))

> This swap! replaces the value in recent-activity with (concat 
> @recent-activity feed @recent-activity), approximately
>
Adding to Stephen's point, *swap!* passes the current atom state into the 
function you gave it. So the correct way would be

(swap! recent-activity #(concat feed %))

However, you also seem to be mistaking *concat* for something it isn't: 
string concatenation. What really happens is your string gets converted 
into a *sequence of individual chars* --- and yes*, *that is *very* wasteful 
with memory: each sequence item occupies 64 bytes (on my setup: Java 7, 
Clojure 1.5).

String concatenation is achieved with the function *str*.

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