On Tue, Oct 4, 2011 at 2:25 PM, Shoeb Bhinderwala
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 great way to see the relat
Thanks. Didn't think it would exist in clojure.core.
On Oct 4, 4:58 pm, Ulises 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" "
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 flatte
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
> 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
(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