On Tue, Apr 27, 2010 at 3:41 PM, Mark J. Reed <[email protected]> wrote:

> I'm a bit surprised that it's not there already, at least in
> clojure.contrib, but it's not hard to write, at least for vectors:
>
> (defn insert [vec pos item]
>     (apply merge (subvec vec 0 pos) item (subvec vec pos)))
>

Er, that should be conj, not merge.  Though, perhaps surprisingly, it works
as written.

-- 
Mark J. Reed <[email protected]>

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

Reply via email to