Y
Hacker News
new
|
ask
|
show
|
jobs
by
zapzupnz
2754 days ago
Yeah, I was wrong. I updated my comment. I think I just meant to check if a range contains a value, as I changed it to.
1 comments
saagarjha
2754 days ago
You can use ~= if you're looking for a succinct way to do an operation like this:
if 2...4 ~= x
link
zapzupnz
2754 days ago
I didn't know about this. Brilliant, cheers!
link