(def s1
(seq
[s1
(seq [s2 s3]) s4 s5 (seq [s6 (seq [s7 s8])
s9])]))
user = s1
(s1 (s2 s3) s4 s5 (s6 (s7 s8) s9))
How to convert s1 to a flat sequence like this:
(s1 s2 s3 s4 s5 s6 s7 s8 s9)
--
You received this message because you are subscribed to the Google
Groups Clojure
user = s1
(s1 (s2 s3) s4 s5 (s6 (s7 s8) s9))
How to convert s1 to a flat sequence like this:
(s1 s2 s3 s4 s5 s6 s7 s8 s9)
(flatten s1)
jack.
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to
user= (flatten s1)
(s1 s2 s3 s4 s5 s6 s7 s8 s9)
Sincerely,
Michał
--
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 subject contains the answer :)
sandbox (def s1 (seq [s1 (seq [s2 s3]) s4 s5 (seq [s6
(seq [s7 s8]) s9])]))
#'sandbox/s1
sandbox s1
(s1 (s2 s3) s4 s5 (s6 (s7 s8) s9))
sandbox (flatten s1)
(s1 s2 s3 s4 s5 s6 s7 s8 s9)
sandbox (doc flatten)
-
clojure.core/flatten
([x])
Thanks. Didn't think it would exist in clojure.core.
On Oct 4, 4:58 pm, Ulises ulises.cerv...@gmail.com wrote:
your subject contains the answer :)
sandbox (def s1 (seq [s1 (seq [s2 s3]) s4 s5 (seq [s6
(seq [s7 s8]) s9])]))
#'sandbox/s1
sandbox s1
(s1 (s2 s3) s4 s5 (s6 (s7 s8) s9))
sandbox
On Tue, Oct 4, 2011 at 2:25 PM, Shoeb Bhinderwala
shoeb.bhinderw...@gmail.com wrote:
Thanks. Didn't think it would exist in clojure.core.
I highly recommend trying out Chas Emerick's Clojure Atlas:
http://clojureatlas.com - it makes searching for functions AND
concepts really easy and provides a