为表中每个元素前插入序号
_$ (setq a'("a" "b" "c"))("a" "b" "c")
_$ (setq n (length a))
3
_$ (apply 'append (mapcar'(lambda(x)(setq a(cdr a))(list (- n (length a)) x))a))
(1 "a" 2 "b" 3 "c")
(setq i 0)(apply'append(mapcar'(lambda(x)(List(setq i(1+ i))x))a)) llsheng_73 发表于 2023-6-5 16:52
(setq i 0)(apply'append(mapcar'(lambda(x)(List(setq i(1+ i))x))a))
谢谢73哥! 感谢分享,很简洁 不错 很简洁
页:
[1]