Lab 3

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

problema 1 (defun my-first (l) (car l)) (defun my-rest (l) (cdr l)) (defun construct (a l) (cons a l))

(defun my-second (l) (car(cdr l))) (defun my-third (l) (car(cdr(cdr l))))

problema 2 (defun rotate-left (l) (append (cdr l) (list(car l))))

problema 3 (defun rotate-right (l) (append (last l) (reverse(cdr(reverse l))))) problema 4 (defun palindrom (l) (append l (reverse l)))

problema 5 (defun ec2 (a b c) (list (/ (- (- 0 b) (sqrt(- (* b b) (* 4 a c)))) (* 2 a)) (/ (+ (- 0 b) (sqrt((* b b) (* 4 a c)))) (* 2 a))))

You might also like