# Use of placeholders in functions [duplicate]

I'm having some trouble with Mathematica's placeholders within functions. The function sel[lowerLimit_] should select all elements of x that are greater than the lowerLimit:

In[227]:= x = Range[10]
Out[227]= {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}

sel[lowerLimit_] = Select[x, # > lowerLimit &]
Out[230]= {}


However, as you can see in Out[230], Mathematica doesn't let me create the function sel.

Does someone have an idea why this is happening?

• sel[lowerLimit_]: = Select[x, # > lowerLimit &] . you need SetDelayed not Set. You should then be able to call your function. – ubpdqn Feb 2 '15 at 8:15
• That was it, thanks! – alxppp Feb 2 '15 at 8:22
• you're welcome...it is a common issue when you're starting...and even later...the power of ':', like the power of the hyphen, e.g. "I resign" v "I re-sign":) – ubpdqn Feb 2 '15 at 8:25