Early beginner here. I'm looking for a function that takes a list and changes only its first element, using some function or other. I realize
setcar sort of does that, but it also changes the initial list. Thus if I have
(setq mylist '("Red" "Green" "Blue"))
and then run
(setcar mylist (downcase (car mylist))
the value of
mylist will change to
("red" "Green" "Blue").
What I'm looking for, though, is a function that only outputs the value that
setcar will set
mylist to but does not change the value of
I realize I could do, e.g.
(setq mynewlist mylist) (setcar mynewlist (downcase (car mynewlist))
and get essentially the same result. But I wanted to know if this is the best way to do it.