Sujet : Re: help me with this function
De : no.email (at) *nospam* nospam.invalid (Paul Rubin)
Groupes : comp.lang.lispDate : 03. Jul 2024, 01:03:12
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <87ikxnjq9r.fsf@nightsong.com>
References : 1
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
"B. Pym" <
No_spamming@noWhere_7073.org> writes:
(myfunc 'b '((b 2) (c 3) (b 4) (d 5) (b 6)))
===>
(2 4 6)
(myfunc 'b '((b 2) (c 3) (b #f) (d 5) (b 6)))
===>
(2 6)
Should be (2 #f 6).
This works:
(define (m2 x lst)
(map cadr (filter (lambda (ys) (equal? (car ys) x)) lst)))