On Wed, Mar 4, 2009 at 3:17 PM, Mibu <mibu.cloj...@gmail.com> wrote:
>
> Joshua, my puzzlement is not with the first element but the last.
>
> For example, the (range -1 2) gives (-1 0 1).

Because, if you have a vector of 10 elements, (and your language
starts indexing from 0) you can use (range 10) for the indexes,
instead of (range (- 10 1)).  Or at least that makes sense to me.

It also makes sense to me that (range 10) gives you 10 numbers.  Of
course if range started at 1 by default then I would expect (range 10)
to produce (1 2 3 4 5 6 7 8 9 10), but since it starts at 0 by
default, I think it is correct the way it is.

-- 
Michael Wood <esiot...@gmail.com>

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