title: In Objective C, is there any cleaner way to test membership against NSSet created on the fly?
body: <p>For example, I remember in Pascal / Delphi language, we can do something like this:</p>
  
  <pre><code>if (i in [1, 2, 3, 6, 10, 11]) then
  </code></pre>
  
  <p>I know in Obj C we have <code>NSSet</code> and we can test for membership using containsObject selector. But it's way too verbose. And creating <code>NSSet</code> on the fly using wrapper still needs a long code (I have to create an <code>NSArray</code> object wrapper first, and then create a <code>NSSet</code> object from that <code>NSArray</code>). Is there any cleaner way to test for membership in Objective C, maybe like:</p>
  
  <pre><code>if (i in @[@(1), @(2), @(3), @(6), @(10), @(11)]) { }
  </code></pre>
  
  <p>is still fine by me.</p>