Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;2ra LISP
- (SETQ X(CAR '(A B C)))
- (PRINT X)
- (SETQ Y(CAR '(E F R)))
- (PRINT Y)
- (SETQ Z(CAR '(H J P)))
- (PRINT Z)
- (SETQ K(CONS X(CONS Y(CONS Z NiL))) )
- (PRINT K)
- ;3ta
- (SETQ X '(1 2 3 4 ))
- (SETQ N 10)
- (PRINT (LIST (CAR X) (CAR (CDR X)) N (CAR (CDDDR X))))
- (print (cons (cons 'A(cons (cons 'B nil) nil)) (cons 'B (cons 'c nil))))
- (PRINT(LIST (LIST 'A (LIST 'B)) 'B 'C))
- (print (LIST (CAR '(1 2 3)) (CAR '(4 5 6))))
- (setq x '(1 2 3 4 5))
- (* (car x) (car (cdr (cdr x))))
- (* (car x) (car (cdr (cdr x))) (car(cdr(cdr(cdr(cdr x))))) )
- (setq x '(1 2 3))
- (setq y '(4 5 6))
- (append x y)
- (reverse x)
- (last x)
- (setq x '(1 2 3 4))
- (append x (cdr (reverse x)))
Advertisement
Add Comment
Please, Sign In to add comment