On Mon, 2011-12-12 at 10:53 -0800, Michael Jaaka wrote:
> (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)

Though you should note that, despite the `lazy-seq' wrapper around the
body, as soon as you force the outermost seq, you're forcing all the way
down.

-- 
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is better

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