News for hackers. Stuff that matters.
Re:Lambdas in C by Jach on Friday July 01, 2011 @10:00AM (#2718343)
Bah, beat me to it. It's still kind of cool though.

    qsort (array, sizeof (array) / sizeof (array[0]), sizeof (array[0]),
         lambda (int, (const void *a, const void *b),
                 {
                   dump ();
                   printf ("Comparison %d: %d and %d\n",
                           ++ comparison, *(const int *) a, *(const int *) b);
                   return *(const int *) a - *(const int *) b;
                 }));

There are no comments on this comment yet.