Remove items from list?
Posted: Thu Jul 08, 2010 9:37 pm
Is it possible to remove items from nested lists just using set-ref-all?
The empty lists are close but not perfect... :(
Code: Select all
(set 'planets '(("Mercury"
(p-name "Mercury")
(diameter 0.382)
(mass 0.06)
(radius 0.387)
(period 0.241)
(incline 7)
(eccentricity 0.206)
(rotation 58.6)
(moons 0))
("Venus"
(p-name "Venus")
(diameter 0.949)
(mass 0.82)
(radius 0.72)
(period 0.615)
(incline 3.39)
(eccentricity 0.0068)
(rotation -243)
(moons 0))
))
(set-ref-all '(p-name *) planets '() match)
;->
(
("Mercury"
()
(diameter 0.382)
(mass 0.06)
(radius 0.387)
(period 0.241)
(incline 7)
(eccentricity 0.206)
(rotation 58.6)
(moons 0))
("Venus"
()
(diameter 0.949)
(mass 0.82)
(radius 0.72)
(period 0.615)
(incline 3.39)
(eccentricity 0.0068)
(rotation -243)
(moons 0)))