On Oct 8, 8:06 am, "Mark H." <[EMAIL PROTECTED]> wrote:
>
> If you don't like vector-of-vectors or maps, you could write some
> syntactic sugar for mapping two-dimensional indexing onto a one-
> dimensionally-indexed vector, e.g., for an n x n array with Fortran-
> style indexing:
>
> (i, j) -> i + n*j

That was my first thought, but I was hoping there was a library for
this already. It seems to be a surprisingly uncommon use case (not
just in clojure, I've ended up implementing something like that in
several languages) - I'd have thought 2d rectangular arrays were a lot
more popular a data structure than that.

martin
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to