Multidimensional vectors in scheme?

Posted by incrediman on Stack Overflow See other posts from Stack Overflow or by incrediman
Published on 2010-06-02T01:17:30Z Indexed on 2010/06/02 1:23 UTC
Read the original article Hit count: 344

I earlier asked a question about arrays in scheme (turns out they're called vectors but are basically otherwise the same as you'd expect).

Is there an easy way to do multidimensional arrays vectors in PLT Scheme though? For my purposes I'd like to have a procedure called make-multid-vector or something.

By the way if this doesn't already exist, I don't need a full code example of how to implement it. If I have to roll this myself I'd appreciate some general direction though. The way I'd probably do it is to just iterate through each element of the currently highest dimension of the vector to add another dimension, but I can see that being a bit ugly using scheme's recursive setup.

Also, this seems like something I should have been able to find myself so please know that I did actually google it and nothing came up.

© Stack Overflow or respective owner

Related posts about Scheme

Related posts about 2d