So, I'm trying to learn Lisp, and I've come across a problem in the definition of what a String is.
I'm reading the ANSI Common Lisp by Paul Graham, and in this book it states that a String is a vector, or one-dimensional Array.
So, I create a String:
(defvar *my-string* "abc")
And then I can access the first value of my-string this way:
(aref *my-string* 0)
But if it is a vector, why can't I access that element this way:
(svref *my-string* 0)
I mean, when I create a vector this way:
(defvar my-vec (make-array 4 :initial-element 1))
I can access first element using svref:
(svref my-vec 0) ; returns 1
I forgot to add error when I try svref on String:
"The value "abc" is not of type (SIMPLE-ARRAY T (*))."