After toying around at the REPL I realize that I have been working
with a heretofore invalid understanding of collections.  For example,
working with the following collection(s):

signal:
(((1 2 3 4) (2 3 4 5) (3 4 5 6)) ((3 4 5 6) (4 5 6 7) (5 6 7 8)))

I wanted to sum each individual list: e.g. (1 2 3 4) = (10)

I thought I could do this as follows:

(map #(map reduce + %) signal)

This resulted in an error, so trying to comprehend why I ran the
following:

(map #(map identity (take 1 %)) signal)

which results in,
(((1 2 3 4)) ((3 4 5 6)))

So, clojure sees 'signal' as 2 collections, whereas I thought it was a
single collection.  This makes me concerned that I have been doing
everything wrong thus far and getting computational errors. :(  So,
how should I sum each individual list in the above collections?

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