help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: remove sublist


From: Yuri Khan
Subject: Re: remove sublist
Date: Mon, 2 Apr 2018 20:06:43 +0700

On Mon, Apr 2, 2018 at 7:09 PM, Emanuel Berg <address@hidden> wrote:
> Better/built-in/semi-built-in way to do:
>
>     (cl-remove-if
>      (lambda (s) (or (string= "a" s)
>                      (string= "b" s) ))
>      '("0" "a" "b" "c" "d") )
>
>     (cl-remove-if
>      (lambda (s) (pcase s
>                    ("a" t)
>                    ("b" t) ))
>        '("0" "a" "b" "c" "d") )
>
> ?

Maybe

    (cl-set-difference '("0" "a" "b" "c" "d")
                       '("a" "b")
                       :test 'string=)

?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]