Trim elements from the ends of a list The aim is to trim elements in from the ends of a list, depending on if they are in a second list of &quot;falsey&quot; results.
For example, if the first list is [-1, 1, 2, 0, -1, 3, -1, 4, -1, -1] and the second is [-1], then we would remove all leading and trailing -1s from the first input, but not any -1s in the middle: [1, 2, 0, -1, 3, -1, 4]
You may take input in any allowed method and this is code-golf so the shortest code in bytes wins.
Haskell, 37 36 bytes

f v|g&lt;-reverse.snd.span(`elem`v)=g.g

Try it online!

-1 byte thanks to xnor.

How?
f v                     -- define a function f that takes as input a list v of falsey values
  |g&lt;-                  --   inside the definition, define a new function g that...
    reverse             --     reverses...
    .snd                --     the second element of...
    .span               --     a tuple (say (x,y)) where x is the longest prefix of elements that...
      (`elem`v)         --       belong to v...
                        --     and y is the rest of the list
  =g.g                  --   f is defined as the composition g.g (basically apply g twice)