This is test7.m in view mode; [Download] [Up]
#include <coll/coll.h>
main()
{
id a = [[Array alloc] initEncoding:@encode(int)];
int i;
for (i = 0; i < 10; i++)
[a addElement:i];
[a withElementsCall:
({
void __local_func(elt e){printf("%d ",e.int_u+1);}
__local_func;
})];
[a withElementsCall:LAMBDA(void, (elt e), {printf("%d ", e.int_u+2);})];
printf("\n");
exit(0);
}
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.