Because (partial map first) return function
=> (-> [[1 2] [3 4] [5]] (partial map first)) #<core$partial$fn__3796 clojure.core$partial$fn__3796@1cd14f7> you should call function to get result => (-> [[1 2] [3 4] [5]] ((partial map first)) flatten) (1 3 5) 2013/6/8 Matt Smith <[email protected]> > Newbie question here. This code: > > (println (flatten(map first '([1 2] [3 4] [5])))) > > > > > (def mapfirst (partial map first)) > (println > (-> '([1 2] [3 4] [5]) > mapfirst > flatten > )) > > > > > (println > (-> '([1 2] [3 4] [5]) > (partial map first) > flatten > )) > > prints out: > >> (1 3 5) >> (1 3 5) >> () > > > Could someone help me understand why the last println does not print (1 3 > 5) > > thx. > > -- > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to [email protected] > Note that posts from new members are moderated - please be patient with > your first post. > 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 > --- > 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 [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- Alexey Aleksandrov -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. 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 --- 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
