- (setq aa '(1 2 3 e 4 5 6 7 e 8 9 10 11 12 13 14 e 15 16 17 18))
- (setq nn (length aa))
- (setq lst (apply 'append (mapcar'(lambda(x)(setq aa(cdr aa)) (list(cons (- nn (length aa)) x)) )aa)))
- (setq pp nil)
- (foreach x lst (if (equal (cdr x ) 'e) (setq pp (append pp (list (car x)))) ) )
- (setq pp (append (list (car pp)) (mapcar '- (mapcar'- pp (cdr pp))) ) )
- (setq ptlst1 nil)
- (foreach y pp
- (setq ptlst nil)
- (repeat y (setq ptlst (append ptlst (list(cDAR LST) ))) (setq LST(vl-remove (car LST) LST) ) )
- (setq ptlst1 (append ptlst1 (list ptlst) ))
- ) (SETQ PPP (APPEND ptlst1 (LIST (MAPCAR 'CDR LST) )))
- ;命令: !PPP
- ;((1 2 3 E) (4 5 6 7 E) (8 9 10 11 12 13 14 E) (15 16 17 18))
|