Hacker News new | ask | show | jobs
by saagarjha 2751 days ago
You can use ~= if you're looking for a succinct way to do an operation like this:

  if 2...4 ~= x
1 comments

I didn't know about this. Brilliant, cheers!