Or if you want to avoid the #(...%...) syntax: user=> (def a (list 1 2 3)) #'user/a user=> (def b (list '(4 5 6) '(7 8 9))) #'user/b user=> (map (partial map * a) b) ((4 10 18) (7 16 27))
On Aug 19, 4:56 pm, Glen Rubin <rubing...@gmail.com> wrote: > I want to multiply a list of n items by h lists of n items, so that > for example if i have list 'a' and 'b' > > (def a (list 1 2 3)) > (def b (list '(4 5 6) '(7 8 9))) > > when multiplied I will get: > > ((4 10 18) (7 16 27)) -- 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