Community
Hi,
I want to convert the numbers that less than 2.5 and greater than 4.5 to nil. Could someone help me to do it?
The list: (setq a '(0 1 2 3 4 5)).
The result I want to get: (nil nil nil 3 4 nil).
Thanks.
Solved! Go to Solution.
Solved by Kent1Cooper. Go to Solution.
[As in the other thread...] One way:
(mapcar '(lambda (x) (if (<= 2.5 x 4.5) x)) a)