I'm trying to teach myself some LISP and while I understand most of it, I have trouble grasping the eval function. I know that it does it for us already and that it's not good to use (so I hear), but how would I make a function that just adds?
So far I was attempting/thinking
(setf input-prompt "Enter addition epression: ")
(setf output-prompt "The value is: ")
(defun prompt-for-input (msg)
(format t msg))
(defun sum (expression)
(format t "Summing ~d and ~d.~%" x y)
(+ x y))
(defun add ()
(prompt-for-input input-prompt)
(let ((expression (read)))
((sum (expression)))
(add)))
Not really sure where to go on this, any help is appreciated.