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

You can use ~= if you're looking for a succinct way to do an operation like this:

  if 2...4 ~= x
I didn't know about this. Brilliant, cheers!