On Wed, Aug 29, 2012 at 4:03 PM, Erlis Vidal <[email protected]> wrote:
> If yes, how can I do a recursive call when passing the function as a
> parameter to another function, like in this case with mapcat?
You could use `lazy-seq`. Something like this:
(defn my-flatten [x]
(lazy-seq
(if (coll? x)
(mapcat my-flatten x)
[x])))
--
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