On Sep 12, 2011, at 11:28 PM, Ken Wesson wrote:

> But if, as you say, take, drop, etc. work for larger n, it should be
> easy to make nth work with larger n and non-random-access seqs, just
> by changing the non-random-access case to (first (drop n the-seq)).

I'd be rather surprised if nth suddenly started giving linear performance on 
arrays for large values of n. If nth can't be made to work in constant time on 
arrays for n > 2**31, then I'd favor the IllegalArgumentException approach. One 
can always do (first (drop …)) manually if linear performance is acceptable.

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