非常有用,谢谢你们!李做的,Grrr偷的,哈哈。
当我没有得到什么东西时,我会做数字活检,比如:
- defun tst ( / l1 l2 l3)
- (setq l1 '(1 2 3) l2 '(11 12 13) l3 '(21 22 23) l4 (list l1 l2 l3))
-
- (apply 'list l1) ; -> (1 2 3)
- (apply 'list (list l1 l2 l3)) ; -> ((1 2 3) (11 12 13) (21 22 23))
- (apply 'mapcar (list l1 l2 l3)) ; -> error: bad function: 1
- (apply '+ l1) ; -> 6
- (apply '+ (list l1 l2 l3)) ; -> error: bad argument type: numberp: (1 2 3)
- (apply 'mapcar (cons '+ l4)) ; -> (33 36 39)
- (apply 'mapcar (cons 'list l4)) ; -> ((1 11 21) (2 12 22) (3 13 23))
- )
- (tst)
然后我通常会像啊啊,现在咬是有意义的! |