Mathematica beginner here.
I have a function that picks indices based on the value of a passed variable x. This works fine when a concrete value is picked for the variable:
Select[Range[4], # > 2 &] > {3, 4} However, when I compare based on an input variable x, it returns the empty set:
Select[Range[4], # > x &] > {} This is strange to me: How can you compare a concrete value with a variable name? I would have expected it to return an unresolved list of comparisons where x needs to be filled in. I need this since I want to create a ParametricRegion based on a function with such a selection process.
Also note that
Map[Range[n], # > x &] > {1, 2, 3, 4}[#1 > x] & doesn't resolve to anything.