What's wrong here?
Any help?(defun c:rn (/) (setq l (list (list 1 2 nil) (list 477 nil 899 0) (list nil 45577 "gh" (list 4 5) nil 0 56) (list 5 6 7 nil 45 nil "test") ) ) (setq li nil) (setq i 0) (repeat (length l) (setq e (nth i l)) (vl-remove-if '(lambda (x) (or (= 0 x) (= nil x))) e ) ;_ end of vl-remove-if (setq i (1+ i)) (setq li (cons e li)) ))
Any more information? (defun rn3 (l / li e x) (reverse (foreach e l (setq li (cons (vl-remove-if '(lambda (x) (or (= 0 x) (= nil x) (= (type x) 'str))) e ) li ) ) ) ))
This is what i get, and what i wanted ... sorry for no more information - a function to remove nil, o or strings from a list that contains lists. Information meaning what will the desired result look like?
So you already have a solution with rn3? Yes, but more solutions are better... variant?
another way to look at it isremove all non-numeric item on the list? Yes, can work that way too.
页:
[1]