I'm trying to make a function to get a delta between arrays, but right now just want to make a subset: get Nth element.
(defvar p1 #(1 2))
(defvar p2 #(3 4))
(mapcar '(lambda (x) (aref x 0)) '(p1 p2))
debugger invoked on a TYPE-ERROR in ...
The value P1 is not of type ARRAY.
The same error if I make it with make-array.
How do I apply the lambda function, or how to apply (aref x 0)
, or (aref x N)
in general case?
In the end I want to make a function that returns a delta: p2 - p1.