77077 发表于 2014-5-8 11:53
;将双层表中的元素按列拼接
;-------------------------------------
(setq lst1 (list "R1" "R2" "R3")
...
问题1:
- (setq lst1 (list "R1" "R2" "R3")
- lst2 (list "一类居住" "二类居住" "三类居住")
- lst 'nil)
- (foreach x lst1(setq lst(append lst(list(strcat x(nth(vl-position x lst1)lst2))))))
问题2:
- (mapcar '(lambda(x)(list(car x)(cadr x)))lst)
或者- (mapcar '(lambda(x)(vl-remove(last x)x)lst)
或者- (setq lst1 'nil)(foreach x lst(setq lst1(append lst1(list(list(car x)(cadr x))))))
或者- (setq lst1 'nil)(foreach x lst(setq lst1(append lst1(list(vl-remove(last x)x)))))
|