ftp.nice.ch/pub/next/developer/resources/libraries/libobjects.0.1.0.s.tar.gz#/libobjects-0.1.0/checks/test07.m

This is test07.m in view mode; [Download] [Up]

#include <objects/objects.h>

int main()
{
  id a = [[Array alloc] initWithType:@encode(int)];
  int i;
  void plus2 (elt e) {printf("%d ", e.int_u+2);}

  for (i = 0; i < 10; i++)
    [a addElement:i];

  [a withElementsCall:plus2];

  printf("\n");
  exit(0);
}

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.