On Oct 7, 6:30 pm, Martin DeMello <[EMAIL PROTECTED]> wrote: > How do you make a two-dimensional array of a given size? (e.g. (make- > array '(i j)) in common lisp) > > I want to do stuff like, e.g., representing a chessboard, where I can > index into cells and update them.
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 mfh --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---