Yes, both will turn the result seq of (remove ...) into a vector. On 9 September 2014 20:39, stephanos <[email protected]> wrote:
> Another somewhat related question: > > Does > (fn [todos] (into [] (remove #(= (:id %) id) todos))) > equal > (fn [todos] (vec (remove #(= (:id %) id) todos))) > ? > > > On Monday, September 8, 2014 10:44:40 PM UTC+2, stephanos wrote: > > Hey there, > > > > I'm trying to understand this bit from the Om TodoMVC app: > > > > (defn toggle-all [e state] > > (let [checked (.. e -target -checked)] > > (om/transact! state :todos > > (fn [todos] (vec (map #(assoc % :completed checked) todos)))))) > > > > What I don't understand is: why is the 'vec' function used here? It > seems to work fine without it. > > > > Regards > > Stephan > > -- > Note that posts from new members are moderated - please be patient with > your first post. > --- > You received this message because you are subscribed to the Google Groups > "ClojureScript" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/clojurescript. > -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/clojurescript.
