0

How do you create a vector of vectors in scheme, and how can change the input on a certain event?

I am aware of the existence of SRFI25, which allows you to do just that, but I'm interest to see the implementation, as well as the result.

Vincent VD
  • 51
  • 4
  • You might enjoy the [matrices](http://programmingpraxis.com/standard-prelude/#matrices) at my blog, which were stolen from [Kent Dybvig](http://www.scheme.com/tspl3/examples.html#./examples:h1). – user448810 Feb 13 '17 at 19:53
  • Thank you. I think I can make use of that. – Vincent VD Feb 13 '17 at 19:56

1 Answers1

2

This will create an immutable vector:

'#(#(1 2 3) #(4 5 6))

And this will create a mutable vector, with the same structure:

(vector (vector 1 2 3) (vector 4 5 6))
Óscar López
  • 232,561
  • 37
  • 312
  • 386
  • 1
    `'#(#(1 2 3) #(4 5 6))` would be considered a constant and thus immutable. You also have `make-vector`. – Sylwester Feb 13 '17 at 20:09