Code: Select all
; get index vectors for list elements
(set 'pList '(a b (c d (x) e)))
(ref 'x pList) → (2 2 0)
(ref '(x) pList) → (2 2)
; the key expression is in a variable
(set 'p '(c d (x) e))
(ref p pList p) → (2)
Code: Select all
; get index vectors for list elements
(set 'pList '(a b (c d (x) e)))
(ref 'x pList) → (2 2 0)
(ref '(x) pList) → (2 2)
; the key expression is in a variable
(set 'p '(c d (x) e))
(ref p pList p) → (2)