0

How can I define a function that uses the Range function in its definition. A very simple example would be

f[x_]=Range[x]

However if I try that it outputs "Range specification in Range[x] does not have appropriate bounds"

A more complex use would be

f[x_]=Select[Range[x], OddQ[#] == True &]

Which should give all odd numbers below x.

However neither of these work due to the problem with Range. Is there any way I can fix this, or another function I can use that has the same effect?

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
volcanrb
  • 373
  • 1
  • 5

0 Answers0