Thanks to all for responses.
I just wanted to use that in higher-order composition in mind, not to
construct any data structures.
I have tweaked a bit the function:
(defn conr[ col item ]
(lazy-seq
(if (seq col)
(cons (first col) (conr (rest col) item))
(list item))))
And now stick with it.
All works as desired:
(conr (conr (conr '( 1 2 3) 4) 6) 7)
(1 2 3 4 6 7)
On 10 Gru, 12:23, Marco Abis <[email protected]> wrote:
> Hi,
>
> total newbie here but what about conj?
>
> (conj (conj (conj [ 1 2 3] 4) 6) 7)
>
> would return
>
> [1 2 3 4 6 7]
>
> --
> Marco Abis
--
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