Our first example demonstrates how to work with arrays in Lisp. Arrays are sequences of elements with a fixed size.
When you run this program, you should see output similar to:
In Lisp, arrays are typically printed in the form #(v1 v2 v3 ...) for one-dimensional arrays and #2A((v11 v12 v13) (v21 v22 v23)) for two-dimensional arrays.
Note that Lisp arrays are zero-indexed, just like in many other programming languages. The make-array function is used to create arrays with a specified size and optional initial values. The vector function can be used to create one-dimensional arrays with initial values.
For multi-dimensional arrays, we use nested lists to specify the dimensions and initial values. The #2A reader macro is used to create two-dimensional arrays inline.
Lisp provides powerful array manipulation capabilities, and you can perform various operations on arrays using built-in functions and macros.