Implement range function without using numbers in code You have to create a function range, such that it takes two (integer) arguments a and b (a &lt; b) and returns all the numbers in between them. So:

range(5, 10) // should output 6, 7, 8, 9
range(-5, 2) // should output -4, -3, -2, -1, 0, 1
range(5, 0) // can throw an error/empty/null/undefined/whatever (a is not &lt; b)
// bonus points for non integer handling
range(0.5, 4.5) // 1.5, 2.5, 3.5
range(0.5, 4) // range doesn't make sense, error/null/empty
range(5, 5) // etc. should return empty/null/undefined/whatever


Your code must not use any numbers at all, but you can use arithmetic operators. If your language has a range function in-built, you cannot use that as well.

Shortest code wins.
Javascript (49)(45)
As feersum said, I do not know why anyone would have to use numbers here.
f=(a,b)=&gt;{for(c=[];a&lt;b;c.push(a++));return c}

Old:
f=(a,b)=&gt;{c=[];for(;a&lt;b;a++){c.push(a);}return c}

I am sure it can be golfed down further=)