Giving nil a value
Posted: Tue Nov 07, 2017 1:02 am
Hi guys,
I would like to replace any and all nils in a list with "none" . If I can see the nil
I can do
but
returns nil. and
returns true.
How might I fix this? I don't know where a nil might pop up.
thank you.
I would like to replace any and all nils in a list with "none" . If I can see the nil
Code: Select all
(set 'a '(1 2 nil 4))
Code: Select all
(setf (a 2) "none")
Code: Select all
(dolist (i a)(when (null? i)(setf i "none")))
Code: Select all
(null? (a 2))
How might I fix this? I don't know where a nil might pop up.
thank you.