The function getf
works like that:
CL-USER> (getf '(:name "pedro") :name)
"pedro"
CL-USER> (getf '(:name "pedro") :whatever)
NIL
NIL
is the default value. Is it possible to change it?
Yes. The documentation defines this possibility:
(getf place indicator &optional default)
Thus, the default value it's actually an optional argument. An example using it would be:
CL-USER> (getf '(:name "pedro") :name "no-answer")
"pedro"
CL-USER> (getf '(:name "pedro") :whatever "no-answer")
"no-answer"