I want to make user-program which extract elements a
which have element b
(given by parameter) as pair in list.
Like, if I give c
as parameter and list ((c a) (c b) (d f) (d g))
,
result should be 'a' 'b'
;
So I define a function as below,
(defun myr (b a) (if (= CAAR(a) b) CDAR(a) 'nope myr(b CDR(a))));
and call like this
myr(b ((b a) (b c) (a d) (a f)))
But result is like variable myr has no value
Its my first time in Lisp, So just tell me what keyword should I search for will be great help for me.
Thank you for reading.