
Code: Select all
(defun min-list (mlist)
(eval `(min ,@mlist)))
Code: Select all
(defun min-list (mlist)
(eval `(min ,@mlist)))
No. Just, no!Indecipherable wrote:Not really in a loop, but I guess it can be put inside it![]()
Code: Select all
(defun min-list (mlist) (eval `(min ,@mlist)))
As a rule of thumb, don't use eval unless what you are doing really needs an evaluator (e.g. if you are generating functions on-the-fly or if you need an interpreter of some sort).Indecipherable wrote:Not really in a loop, but I guess it can be put inside it![]()
Code: Select all
(defun min-list (mlist) (eval `(min ,@mlist)))
Code: Select all
(defun min-list (mlist)
(apply #'min mlist))