Vous êtes sur la page 1sur 8

CL-USER 1 > set 'l '(1 . (( 2 . ((4 . (( 8 . nil ) . (9 . nil))) . ( 5 . nil ))) . ( 3 . (( 6 . (( 10 . nil ))) . ( 7 .

( (
11 . nil ) . ( 12 . nil )))))))

(1 (2 (4 (8) 9) 5) 3 (6 (10)) 7 (11) 12)

CL-USER 2 > setq m' (1 ( 2 ( 4 8 9) 5 ) ( 3 ( 6 10 ) (7 11 12 )))

(1 (2 (4 8 9) 5) (3 (6 10) (7 11 12)))

CL-USER 3 > cddddr l

(7 (11) 12)

Error while reading: Unmatched right parenthesis.

CL-USER 4 > setq t2 ( cddddr l)

(7 (11) 12)

CL-USER 5 > cddadr l

(5)

CL-USER 6 > car ( cdr l)

(2 (4 (8) 9) 5)

CL-USER 7 > setq a ( caadr l)

CL-USER 8 > cdr ( caadr l)

Error: Cannot take CDR of 2.

1 (abort) Return to level 0.

2 Return to top loop level 0.

Type :b for backtrace or :c <option number> to proceed.


Type :bug-form "<subject>" for a bug report template or :? for other options.

CL-USER 9 : 1 > cdr (cadr l)

((4 (8) 9) 5)

CL-USER 10 : 1 > car ( cdadr l)

(4 (8) 9)

CL-USER 11 : 1 > setq t3 ( cadadr l)

(4 (8) 9)

CL-USER 12 : 1 > l

(1 (2 (4 (8) 9) 5) 3 (6 (10)) 7 (11) 12)

CL-USER 13 : 1 > t2

(7 (11) 12)

CL-USER 14 : 1 > t1

Error: The variable T1 is unbound.

1 (continue) Try evaluating T1 again.

2 Specify a value to use this time instead of evaluating T1.

3 Specify a value to set T1 to.

4 (abort) Return to level 1.

5 Return to debug level 1.

6 Return to level 0.

7 Return to top loop level 0.

Type :b for backtrace or :c <option number> to proceed.

Type :bug-form "<subject>" for a bug report template or :? for other options.
CL-USER 15 : 2 > setq t1 (cddadr l)

(5)

CL-USER 16 : 2 > l

(1 (2 (4 (8) 9) 5) 3 (6 (10)) 7 (11) 12)

CL-USER 17 : 2 > t1

(5)

CL-USER 18 : 2 > t2

(7 (11) 12)

CL-USER 19 : 2 > t3

(4 (8) 9)

CL-USER 20 : 2 > a

CL-USER 21 : 2 > append t3 t2

(4 (8) 9 7 (11) 12)

CL-USER 22 : 2 > list t3 t2

((4 (8) 9) (7 (11) 12))

CL-USER 23 : 2 > list nil t2

(NIL (7 (11) 12))

CL-USER 24 : 2 > m

(1 (2 (4 8 9) 5) (3 (6 10) (7 11 12)))

CL-USER 25 : 2 > cdr m


((2 (4 8 9) 5) (3 (6 10) (7 11 12)))

CL-USER 26 : 2 > cdr ( cdr m)

((3 (6 10) (7 11 12)))

CL-USER 27 : 2 > cdddr m

NIL

CL-USER 28 : 2 > caddr m

(3 (6 10) (7 11 12))

CL-USER 29 : 2 > cdaddr m

((6 10) (7 11 12))

CL-USER 30 : 2 > car ( cdaddr m)

(6 10)

CL-USER 31 : 2 > cdr ( cdaddr m)

((7 11 12))

CL-USER 32 : 2 > car ( cdaddr m)

(6 10)

CL-USER 33 : 2 > cadr ( cdaddr m)

(7 11 12)

CL-USER 34 : 2 > m

(1 (2 (4 8 9) 5) (3 (6 10) (7 11 12)))

CL-USER 35 : 2 > cadr m

(2 (4 8 9) 5)
CL-USER 36 : 2 > cdadr m

((4 8 9) 5)

CL-USER 37 : 2 > cddadr m

(5)

CL-USER 38 : 2 > setq m2 (cadr ( cdaddr m))

(7 11 12)

CL-USER 39 : 2 > setq m1 (cddadr m)

(5)

CL-USER 40 : 2 > setq x ( car (cddadr m))

CL-USER 41 : 2 > m

(1 (2 (4 8 9) 5) (3 (6 10) (7 11 12)))

CL-USER 42 : 2 > setq 1 ( car m)

Error: Cannot setq 1 -- not a symbol.

1 (abort) Return to level 2.

2 Return to debug level 2.

3 Return to level 1.

4 Return to debug level 1.

5 Return to level 0.

6 Return to top loop level 0.

Type :b for backtrace or :c <option number> to proceed.

Type :bug-form "<subject>" for a bug report template or :? for other options.
CL-USER 43 : 3 > setq a ( car m)

CL-USER 44 : 3 > setq b ( cadr m)

(2 (4 8 9) 5)

CL-USER 45 : 3 > setq b ( caadr m)

CL-USER 46 : 3 > cadr ( caadr m)

Error: Cannot take CDR of 2.

1 (abort) Return to level 3.

2 Return to debug level 3.

3 Return to level 2.

4 Return to debug level 2.

5 Return to level 1.

6 Return to debug level 1.

7 Return to level 0.

8 Return to top loop level 0.

Type :b for backtrace or :c <option number> to proceed.

Type :bug-form "<subject>" for a bug report template or :? for other options.

CL-USER 47 : 4 > cdadr m

((4 8 9) 5)

CL-USER 48 : 4 > setq m3 ( cadadr m)

(4 8 9)
CL-USER 49 : 4 > list m3 m2

((4 8 9) (7 11 12))

CL-USER 50 : 4 > append m3 m2

(4 8 9 7 11 12)

CL-USER 51 : 4 > append a (list m3 m2)

Error: 1 is not of type LIST.

1 (abort) Return to level 4.

2 Return to debug level 4.

3 Return to level 3.

4 Return to debug level 3.

5 Return to level 2.

6 Return to debug level 2.

7 Return to level 1.

8 Return to debug level 1.

9 Return to level 0.

10 Return to top loop level 0.

Type :b for backtrace or :c <option number> to proceed.

Type :bug-form "<subject>" for a bug report template or :? for other options.

CL-USER 52 : 5 > list b m3

(2 (4 8 9))

CL-USER 53 : 5 > list (b m3) m2

Error: Undefined operator B in form (B M3).

1 (continue) Try invoking B again.

2 Return some values from the form (B M3).


3 Try invoking something other than B with the same arguments.

4 Set the symbol-function of B to another function.

5 Set the macro-function of B to another function.

6 (abort) Return to level 5.

7 Return to debug level 5.

8 Return to level 4.

9 Return to debug level 4.

10 Return to level 3.

11 Return to debug level 3.

12 Return to level 2.

13 Return to debug level 2.

14 Return to level 1.

15 Return to debug level 1.

16 Return to level 0.

17 Return to top loop level 0.

Type :b for backtrace or :c <option number> to proceed.

Type :bug-form "<subject>" for a bug report template or :? for other options.

CL-USER 54 : 6 > setq m4 ( list b m3 )

(2 (4 8 9))

CL-USER 55 : 6 > list m4 m2

((2 (4 8 9)) (7 11 12))

CL-USER 56 : 6 > append m4 m2

(2 (4 8 9) 7 11 12)

CL-USER 57 : 6 >

Vous aimerez peut-être aussi