The following code selects a special element from a list
thelist = {"this", "notthis"};
Select[thelist, (# == "this") &]
What I want is a function which does just that and which takes lists (like thelist) and a string (like "this") as argument. However I have a problem, because Select already uses an abstract function and so the naive idea
sel:=Select[#1, (# == #2) &]
sel[thelist,"this"]
doesn't work. This is really about the Function command and the problem might not just appear with Select but any abstract function nesting.
How to construct the object I need?
Function[{x, y}, Select[x, # == y &]][thelist, "this"]
? $\endgroup$