Multidimensional vectors in the circuit?

I used to ask a question about arrays in a circuit (it turns out that they are called vectors, but basically they are otherwise the same as you would expect).

Is there an easy way to make multidimensional arrays of arrays in a PLT scheme? For my purposes, I would like to have a procedure called make-multid-vector or something else.

By the way, if this does not exist yet, I do not need a complete code on how to implement it. If I have to roll it, I would appreciate some general direction. The way I will probably do this is to simply iterate over each element of the highest dimension of the vector to add another dimension, but I see that it is a little ugly using the recursive setting of the circuit.

Also, it looks like what I was supposed to find, so please know that I really did it on Google and nothing worked.

+4
source share
1 answer

The two general approaches are the same as in many languages, either using a vector of vectors, or (more efficiently) using one X * Y vector and calculating the location of each link. But there is a library that does this - look at the docs on srfi/25 , which you can get with (require srfi/25) .

+7
source

Source: https://habr.com/ru/post/1311573/


All Articles