Hi, On Feb 15, 9:10 am, Matthias von Rohr <[email protected]> wrote:
> I'm fairly new to clojure but having a great time right now with this > beautiful language. I've been toying around with the REPL this > morning: > > http://paste.lisp.org/display/94972 > > Now the question arises, am I missing the point or is this some sort > of an internal restriction? Just a guess: nth eventually calls RT/nth which takes a primitive int. You overflow the int and get a negative number, which causes the for loop in the Sequential branch to fall through immediately because the index is "smaller" than 0. Hence the exception. I'm not sure whether this is entirely correct, though. I guess this is done for performance reasons. Taking the 500000000000000000000th item of a collection is rather unlikely, I fancy. Clojure is known to discourage such actions in other situations. Sincerely Meikel -- 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
