Resp_Pract_01.lsp



; Ejercicio 1
; Suma dos numeros
;=====================
(defun Suma2 (a b)
	(+ a b)
	(setq x (read) )
	(+ 3 x)
)
; Ejercicio 2
; Busqueda en una lista
;=====================
(defun Bus ()
	(setq ok "no")
	(setq Lista '(1 2 3 4 5 6))
	(print "Atomo a buscar: ")
	(setq Atomo (read))
	(dolist (At Lista)
		;(print At)
		(if (eq Atomo At) (setq ok "si") )
	)
	(print ok)
)

; Ejercicio 3
; Contador de objetos
;=====================
(defun Cuenta (Lista)
	(setq N 0)
	(dolist (At Lista)
		(setq N (+ N 1))
	)
	(print N)
)

; Ejercicio 4
; Almacenamiento de conocimiento
;=====================
(defun Almacena ()
	(setq Item 1)
	(setq Lista NIL)
	(loop
		(cond  ((eql Item 0) (return)))
		(print "Contenido Actual: ")
		(print Lista)
		(print "Anexa informacion")
		(setq Item (read))
		(setq Lista (append Lista (list Item)))
	)
)