#include <Foundation/Foundation.h>
#include <Foundation/NSIndexSet.h>
int main()
{
  NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
  NSMutableIndexSet *midx = [NSMutableIndexSet indexSet];
  // 2147483647
  NSLog(@"%i",[midx lastIndex]); 
  [midx removeIndexesInRange:NSMakeRange(0,2147483647)];
  [midx addIndex:23];
  [midx count];
  NSLog(@"%@",midx);
  [midx addIndex:22];
  [midx addIndex:21];
  [midx addIndex:20];
  NSLog(@"%@",midx);
  NSLog(@"%i",[midx firstIndex]);
  NSLog(@"%@",[midx containsIndex:21] ? @"YES" : @"NO");
  DESTROY(pool);
}


