i made function , want make print :
(range ‘(0 7 8 2 3 –1))
(-1 8)
;; print 'the range between smallest number , second smallest number in list' , 'the largest number'
so made code :
(defun my-range (list-of-numbers) (let* ((largest (max list-of-numbers)) (msmallest (min list-of-numbers)) (ssmallest (min (remove (min list-of-numbers) list-of-numbers))) (range (- msmallest ssmallest))) (list range largest)))
and input function , number example on debug window :
(my-range '(0 7 8 2 3 -1))
error:
(0 7 8 2 3 -1)' not of expected type
real'[condition type: type-error]
the error message printed in window... meaning of 'is not of expected type 'real'? , how can fix problem? and, let me know problems code has?
i need help.
Comments
Post a Comment