I have the following code:
(define-struct p (x z))
(define-struct s (p my-symbol))
(define N01 (make-s (make-p 22 'a) 'symbol))
(define N02 (make-s (make-p 25 'b) 'symbol))
(define N03 (make-s (make-p 23 'c) 'symbol))
(define my-list (list N01 N02 N03))
Now I want to have a list that should look like this: (list 22 25 23)
or (list 'a 'b 'c)
I know that when I call this (p-x (s-p (first my-List)))
I get 22 but how can I do that for the whole numbers or symbols in my-List
? I think it can be done in a recursive procedure.
Note: I need to use the beginner level with list abbreviations
Thank you for your help!