Y
Hacker News
new
|
ask
|
show
|
jobs
by
awaage
5463 days ago
how about this (example in ruby): def plus_1(x); arr = []; arr[x] = true; return arr.size; end
1 comments
kirillzubovsky
5463 days ago
Funny, this is the first thing I thought of, but then realized it would only work if x>0
link
awaage
5463 days ago
oops! good catch!
link
custominstall
5461 days ago
lol .. but also wont work for decimals
link