List indexing
Posted: Mon Jan 09, 2012 7:06 pm
; implicit indexing from "Code Patterns"
(set 'L '(a b (c d (e f) g) h i))
(L 2 2 1) → f
(L 2 2) → (e f)
Is there a reverse function to get the vector of an element in a nested list ?
Is it right, that the find function principally does this, but only in the highest level ?
For example
(find 'a L ) -> 0
(find 'b L ) -> 1
(find 'c L ) -> nil ?
(set 'L '(a b (c d (e f) g) h i))
(L 2 2 1) → f
(L 2 2) → (e f)
Is there a reverse function to get the vector of an element in a nested list ?
Is it right, that the find function principally does this, but only in the highest level ?
For example
(find 'a L ) -> 0
(find 'b L ) -> 1
(find 'c L ) -> nil ?