title: Code optimization (combine 2 lines of code into 1)
body: <p>I have tried some combinations but can't seem to get it right. I am looking to combine line 2 and 3 into one line of code.</p>
  
  <pre><code>NSPredicate *predicate = [NSPredicate predicateWithFormat:@"name == 'SSM M51 Copperhead'"];
  NSArray *searchResults1 = [self.weaponsArray filteredArrayUsingPredicate:predicate];
  weapons = [searchResults1 objectAtIndex:0];
  if(weapons.range &gt; SSMrange)
      SSMrange = weapons.range;
  </code></pre>
  
  <p>('weapons' is a class).</p>